Let's say I have a list of elements like:

```
<ul>
  <li>a</li>
  <li>b</li>
  <li>c</li>
  <li>d</li>
  <li>e</li>
  <li>f</li>
  <li>g</li>
  <li>h</li>
  <li>i</li>
  <li>j</li>
</ul>

```

And I have an array like this: `[ 2, 5, 6 ]`.

**(both the list of elements and this array can be quite huge, but let's keep it simple)**

How can I use jQuery efficiently to pick the elements corresponding to those elements? (in this case it would be list elements that contain `c`, `f` and `g`)

One way would be to use a jQuery `each()` and search for the index in the array. But that requires a linear search on the array for every iteration and it's not quite optimized. 

Another way is to use the `eq()` selector or `eq()` function passing one index. But then I have to repeat the process for every array element and that's not efficient either. Unfortunately the `eq()` doesn't get an array as a parameter.

Another way is to write a jQuery plugin but that seems like too much work for such a small problem.

Do you know a better way that works more efficiently?