```python
def index_map(labels: list) -> dict:
    """
    Given a list of labels, return a mapping from each label to every position it holds.
    Positions are counted from zero and given in increasing order.
    A label appearing once still gets a list.
    """
    result = {}
    for i, label in enumerate(labels):
        if label not in result:
            result[label] = []
        result[label].append(i)
    return result
```