title: Efficent addition of indices to 2d-arrays of various sizes
body: <p>If one had a set of 2d-arrays of different dimensions, say:</p>
  
  <pre><code>float[][] P = new float[2][3];
  float[][] B = new float[2][2];
  float[][] A = new float[32][2];
  float[] E = new float[2];
  </code></pre>
  
  <p>currently holding no values.</p>
  
  <p>Is it possible to add values to each index of the arrays by looping through the index values of the largest collective dimensions (in this case):</p>
  
  <pre><code>for (int i=0; i&lt;32; i++){
      for (int j=0; j&lt;3; j++){
           //doSomething to (P[i][j]) if P has this index
           //doSomething to (B[i][j]) if B has this index
           //doSomething to (A[i][j]) if A has this index
           //doSomething to (E[i][j]) if E has this index         
      }
  }
  </code></pre>
  
  <p>Otherwise, one must have four separate loops!</p>
  
  <p>Thank you.</p>