ts <code>v[2]</code>, <code>v[3]</code>, and <code>v[4]</code>.</p>
<p>The only subtlety with vectors is in inferring the return type when there are multiple indexes. For example, consider the following minimal example.</p>
<div class="sourceCode" id="cb20"><pre class="sourceCode stan code-with-copy"><code class="sourceCode stan"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a><span class="dt">array</span>[<span class="dv">3</span>] <span class="dt">vector</span>[<span class="dv">5<