Return an array of index values from array of Bool where true
<p>Anyone know an elegant way to return an array of index values from an array of Bools where the values are true. E.g:</p>

<pre><code>let boolArray = [true, true, false, true]
</code></pre>

<p>This should return:</p>

<pre><code>[0,1,3]
</code></pre>