title: Combine two lists and one array to create a 3D data list
body: <p>Suppose I have the following three lists:</p>
  
  <pre><code>x = {i, j};
  y = {a, b, c};
  z = {{1, 2, 3}, {4, 5, 6}};
  </code></pre>
  
  <p>Where <code>z</code> is the data corresponding to the <code>x</code> and <code>y</code> coordinates, <code>z(x_i,y_j) = z_ij</code>. I need to create an array of the following form:</p>
  
  <pre><code>zz = {{i, a, 1}, {i, b, 2}, {i, c, 3}, {j, a, 4}, {j, b, 5}, {j, c, 6}}
  </code></pre>
  
  <p><strong>How can I do it efficiently in Mathematica 10.0?</strong> </p>
  
  <hr>
  
  <p>This was my attempt so far:</p>
  
  <pre><code>zz = Table[{x[[ii]], y[[jj]], z[[ii, jj]]}, {ii, 1, Length[x]}, {jj, 1, Length[y]}]~Flatten~1
  </code></pre>
  
  <p>My ultimate goal is to plot (<code>ListPlot3D[zz]</code>) or interpolate this data (<code>Interpolation[zz]</code>), and <code>x</code> and <code>y</code> may be non-uniformly sampled.</p>