title: Efficient way to group indices of the same elements in a list
body: <p>Let's say I have a list that looks like:</p>
  
  <pre><code>[1, 2, 2, 5, 8, 3, 3, 9, 0, 1]
  </code></pre>
  
  <p>Now I want to group the indices of the same elements, so the result should look like:</p>
  
  <pre><code>[[0, 9], [1, 2], [3], [4], [5, 6], [7], [8]]
  </code></pre>
  
  <p>How do I do this in an efficient way? I try to avoid using loops so any implementations using numpy/pandas functions are great.</p>