mutate array in-place to get bitwise and against a scalar value