Starting with this initial 2D array:

```
var initialArray = [[2,3],[6,7],[4,5],[1,2],[5,6],[2,3]];

```

I need to create this 3D array programmatically:

```
var fullArray = [

[[2,3],[6,7],[4,5],[1,2],[5,6],[2,3]],

[[3,4],[0,1],[5,6],[2,3],[6,7],[3,4]],

[[4,5],[1,2],[6,7],[3,4],[0,1],[4,5]],

[[5,6],[2,3],[0,1],[4,5],[1,2],[5,6]],

[[6,7],[3,4],[1,2],[5,6],[2,3],[6,7]],

[[0,1],[4,5],[2,3],[6,7],[3,4],[0,1]],

[[1,2],[5,6],[3,4],[0,1],[4,5],[1,2]],

[[2,3],[6,7],[4,5],[1,2],[5,6],[2,3]],

[[3,4],[0,1],[5,6],[2,3],[6,7],[3,4]],

[[4,5],[1,2],[6,7],[3,4],[0,1],[4,5]],

[[5,6],[2,3],[0,1],[4,5],[1,2],[5,6]]

];

```

See the pattern?

On each pair, the [0] position should increment to 6 (from any starting number <= 6) and then reset to 0 and then continue incrementing. Similarly, the [1] position should increment to 7 (from any starting number <= 7) and then reset to 1 and then continue incrementing.

In this example, there are 10 2D arrays contained in the fullArray. However, I need this number to be a variable. Something like this:

```
var numberOf2DArraysInFullArray = 12;

```

Furthermore, the initial array should be flexible so that initialArray values can be rearranged like this (but with the same iteration follow-through rules stated above):

```
var initialArray = [[6,7],[2,3],[5,6],[4,5],[1,2],[6,7]];

```

Any thoughts on how to programmatically create this structure?
Stumped on how to gracefully pull this off.
Feedback greatly appreciated!