Refactor Supertrend calculation to improve clarity and performance by using numpy arrays for calculations.