I have a function that need to operate over a combination of certain elements of an array. The function operates different for 2,3,4... elements of the array. The number of elem