input: Write a function to calculate the sum of all elements in a 2D array.
  assert array_sum([[1,2,3],[4,5,6]]) == 21
  assert array_sum([[1,1,1],[1,1,1]]) == 6
  assert array_sum([[0,0,0],[0,0,0]]) == 0
output: def array_sum(arr):
      return sum(sum(row) for row in arr)