Add a function to set a single nibble in a bitarray.