Another idea to consider: have `readbytes(::IOBuffer)` return the buffer's array without copying when possible. That would provide a "safe" `takebuf_array`.