This function takes the average of all elements in the array except for the outer two, not the average of the middle two or three items (though those things happen to be the same in the examples)