toArrayCopy
Return a contiguous array with the current content written to the output. The returned array is always a copy (can be mutated).
If the .size of the underlying buffers exceeds maximum size of Java array, an RuntimeException will be thrown.