Remove byteBufferToArray conversion where possible