mutate array in-place to get the remainder (%) when divided by scalar value
note that this is slightly different from the modulo mod operator, as this can have a negative sign