Bug fix on array serialization

There was a bug on array serialization, typeIDs of members were written as `uint32_t` instead of `uint8_t`.

This closes issue #8