title: Modify an array from indexes contained in another array
body: <p>I have an array of the shape (2,10) such as:</p>
  <pre class="lang-py prettyprint-override"><code>arr = jnp.ones(shape=(2,10)) * 2
  </code></pre>
  <p>or</p>
  <pre class="lang-py prettyprint-override"><code>[[2. 2. 2. 2. 2. 2. 2. 2. 2. 2.]
   [2. 2. 2. 2. 2. 2. 2. 2. 2. 2.]]
  </code></pre>
  <p>and another array, for example <code>[2,4]</code>.</p>
  <p>I want the second array to tell from which index the elements of <code>arr</code> should be masked. Here the result would be:</p>
  <pre class="lang-py prettyprint-override"><code>[[2. 2. -1. -1. -1. -1. -1. -1. -1. -1.]
   [2. 2. 2. 2.  -1. -1. -1. -1. -1. -1.]]
  </code></pre>
  <p>I need to use <code>jax.numpy</code> and the answer to be vectorized and fast if possible, i.e. not using loops.</p>