'Retrieve all array items as a list of pairs of the form
[(key, [row 1, row 2, ...]), ...]'

def items(self):

    array = []
    last_key = None
    for (i, key) in enumerate(zip(*self.data.columns.values())):
        row = self.row_index[i]
        if (key == last_key):
            array[(-1)][1].append(row)
        else:
            last_key = key
            array.append((key, [row]))
    return array
