Returns total value of all elements in the array