input: Write a python function to calculate the sum of all elements in an array.
  assert array_sum([3, 2, 1, 6, 5, 7, 4]) == 28
  assert array_sum([10, 20, 30, 40, 50]) == 150
  assert array_sum([-1, 1, -2, 2, -3, 3]) == 0
output: def array_sum(arr):
      return sum(arr)