[WIP] Index by

This is a naive implementation that doesn't make any guarantee to what happens if multiple elements have the same return path.