mutate array in-place to get negative value of elements