increment elements of array on device