mutate array in-place to add a scalar value