How does the getHighestOnArray function work?
The function iterates through the input data array and keeps track of the highest value encountered within the specified period.
It updates the output data array with the highest value for each corresponding index.