square of elements in array