Average with array iterator