def initialize(indexes)
      # Create a hash to map each category to positional indexes
      categories = indexes.each_with_index.group_by(&:first)
      @cat_hash = categories.transform_values { |group| group.map(&:last) }