average returns average of array