def read_array(data: nil, stream: nil, offset: 0)
      count, len = read_varint(data: data, stream: stream, offset: offset)
      return [nil, len] if !count
      (0...count).map do |i|
        yield
      end
    end
def read_array(data: nil, stream: nil, offset: 0)
      count, len = read_varint(data: data, stream: stream, offset: offset)
      return [nil, len] if !count
      (0...count).map do |i|
        yield
      end
    end
Reads varint length prefix, then calls the block appropriate number of times to read the items.
 Returns an array of items.