Changing array of elements