Reverse an array in O(n) time complexity without using high-level language-specific reverse helpers. Implement reverse_array(arr) to reverse the input list in place and return it. The input is a Python list of values, and the output must contain the same values in reverse order.
def reverse_array(arr):