input: Write a python function to rotate an array by n positions.
  assert rotate_array([1, 2, 3, 4, 5], 2) == [3, 4, 5, 1, 2]
  assert rotate_array([10, 20, 30, 40, 50], 3) == [40, 50, 10, 20, 30]
  assert rotate_array([7, 9, 11, 13, 15], 1) == [9, 11, 13, 15, 7]
output: def rotate_array(arr, n):
      n = n % len(arr)  # Handle cases where n is greater than the length of the array
      return arr[n:] + arr[:n]