For the JS frontend, we are often times using toTypedArray to use ArrayBuffer. This is really slow and is the bottleneck for using buffers on the Web.
Its possible we could make a multiplatform typealias that uses ByteArray on the JVM and Array<Byte> but this might cause extra boxing