Convert an array of native types to a Uint8Array.
The array to convert.
The typed array unit type.
The converted Uint8Array.
This function performs a deep copy for native types only. It is inspired by https://github.com/AssemblyScript/assemblyscript/blob/main/std/assembly/array.ts#L69-L81
Convert an array of native types to a Uint8Array.