encodeUInt8Array

Encodes the given List of UByte/UInt8 into a ByteArray of size dataSize, writes it to the array's current position, and then increments the position.