input: Write a python function to calculate the cumulative sum of an array in reverse order.
  assert process_array([1, 2, 3, 4]) == 20
  assert process_array([0, 1, 2, 3, 4]) == 35
  assert process_array([10, 20, 30]) == 140
output: def process_array(arr):
      cumulative_sum = 0
      total_sum = 0
      for num in reversed(arr):
          cumulative_sum += num
          total_sum += cumulative_sum
      return total_sum