title: Convert simple array into two-dimensional array (matrix)
body: <p>Imagine I have an array:</p>
  
  <pre><code>A = Array(1, 2, 3, 4, 5, 6, 7, 8, 9);
  </code></pre>
  
  <p>And I want it to convert into 2-dimensional array (matrix of N x M), for instance like this:</p>
  
  <pre><code>A = Array(Array(1, 2, 3), Array(4, 5, 6), Array(7, 8, 9));
  </code></pre>
  
  <p>Note, that rows and columns of the matrix is changeable.</p>