The current `takebuf_array` might be too complicated. The only purpose it serves is obtaining the whole buffer without a copy. Maybe it should either do that or throw an error.