decode an byte buffer as an array of variable sized integers of the given type (signed or unsigned) and array_length.