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