You would have to define what these indices should represent.
In max pooling layers the indices are representing the indices of the max. values, which were “selected”.
In avg pooling layers no indexing/selection is done, since the values covered by the filter kernel are averaged, so all values are used.