input: Write a python function to calculate the sum of an array using recursion.
  assert array_sum([1, 2, 3, 4, 5]) == 15
  assert array_sum([10, 20, 30]) == 60
  assert array_sum([5]) == 5
output: def array_sum(arr):
      if not arr:
          return 0
      return arr[0] + array_sum(arr[1:])