title: Passing std::array
body: <p>I know there are some questions out there with this topic, but no one answered my question so far. I have seen that it is a bit complicated to define a function that takes an std::array of any length. </p>
  
  <p>Is the example below the only way (excluding passing the length as an extra parameter) to do this? </p>
  
  <ol>
  <li>Is the example below really the only way (excluding passing the length as an extra parameter) to do this? </li>
  <li>If so, is it a good practice? </li>
  <li>I have heard that one should avoid templates if possible (regarding debugging etc.). Is it better to solve the whole thing with std::vector then? The access times should not differ that much, should they?</li>
  </ol>
  
  <pre><code>template &lt;typename T, size_t N&gt;
  void addstdArray(std::array&lt;T, N&gt; &amp;arr) {
  
      for(int i : arr) {
          arr[i]++;
      }
  }
  </code></pre>