drain bytes from an iobuffer directly into an array