input: Write a function to split an array of numbers into two halves.
  assert split_array([4, 6, 2, 7, 9]) == ([4, 6], [2, 7, 9])
  assert split_array([1, 2, 3, 4, 5, 6]) == ([1, 2, 3], [4, 5, 6])
  assert split_array([10, 20, 30, 40]) == ([10, 20], [30, 40])
output: def split_array(arr):
      mid = (len(arr) + 1) // 2
      return arr[:mid], arr[mid:]