Add serialization support for ByteArray#