Computes the cumulative sum of an array of values.