Factory for iterator that goes through a list of indices. The indices can be negative.
initialize with the set of indices.