Computes the sum of values in a window moving through an array.