Each selected element stores its index in its own `ndx` property.