Array and bitWrite

Is that right

Well it looks right, but I have no idea why you want to write all zeros one zero at a time.
Just make it equal to zero and it will do all 16 bits at once.