Oops, just a typo on forum.
The way I've done it is no slouch, like.
#include <array.au3>
Global $aGrid[20][10] = [[0,1,2,3,3,4,5,6,7,8],[4,"",5,6,2,6,5,7,8,9],[7,8,0,9,6,6,6,6,6,6],["a","b","c","",3,2,4,0,7,5] _
,["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5] _
,["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5] _
,["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5] _
,["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5],["a","b","c","",3,2,4,0,7,5]]
_ArrayDisplay($aGrid)
$loops = 1000
$Timer = TimerInit()
For $i = 0 To $loops
_MDA_Shuffle($aGrid)
;_ArrayDisplay($aGrid)
Next
ConsoleWrite("_MDA_Shuffle " & TimerDiff($Timer) & @LF)
$Timer = TimerInit()
For $i = 0 To $loops
_ArrayShuffleMultiDim($aGrid)
;_ArrayDisplay($aGrid)
Next
ConsoleWrite("_ArrayShuffleMultiDim " & TimerDiff($Timer) & @LF)
Func _ArrayShuffleMultiDim(ByRef $aArray)
If IsArray($aArray) = 0 Then Return SetError (1)
Local $iDim = UBound($aArray, 0) ; Get No dimensions
If $iDim > 11 Then Return SetError (2)
Local $a[$iDim +1], $aiBound[12] = [0,0,0,0,0,0,0,0,0,0,0,0]
For $i = 1 To $iDim ; For each dimensionn
$aiBound[$i] = UBound($aArray, $i) -1 ; Get dimension size
Next
For $i = 0 To $aiBound[1]
For $j = 0 To $aiBound[2]
For $k = 0 To $aiBound[3]
For $l = 0 To $aiBound[4]
For $m = 0 To $aiBound[5]
For $n = 0 To $aiBound[6]
For $o = 0 To $aiBound[7]
For $p = 0 To $aiBound[8]
For $q = 0 To $aiBound[9]
For $r = 0 To $aiBound[10]
For $s = 0 To $aiBound[11]
For $z = 1 To $iDim
; Get random values for each dimension.
$a[$z] = Random(0, $aiBound[$z], 1)
Next
__Swap($aArray, $iDim, $a, $i, $j, $k, $l, $m, $n, $o, $p, $q, $r, $s)
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
EndFunc
Func __Swap(ByRef $aArray, $iDim, $a, $i, $j, $k, $l, $m, $n, $o, $p, $q, $r, $s)
Local $vTemp
Switch $iDim
Case 1
$vTemp = $aArray[$i]
$aArray[$i] = $aArray[$a[1]]
$aArray[$a[1]] = $vTemp
Case 2
$vTemp = $aArray[$i][$j]
$aArray[$i][$j] = $aArray[$a[1]][$a[2]]
$aArray[$a[1]][$a[2]] = $vTemp
Case 3
$vTemp = $aArray[$i][$j][$k]
$aArray[$i][$j][$k] = $aArray[$a[1]][$a[2]][$a[3]]
$aArray[$a[1]][$a[2]][$a[3]] = $vTemp
Case 4
$vTemp = $aArray[$i][$j][$k][$l]
$aArray[$i][$j][$k][$l] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]] = $vTemp
Case 5
$vTemp = $aArray[$i][$j][$k][$l][$m]
$aArray[$i][$j][$k][$l][$m] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]] = $vTemp
Case 6
$vTemp = $aArray[$i][$j][$k][$l][$m][$n]
$aArray[$i][$j][$k][$l][$m][$n] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]] = $vTemp
Case 7
$vTemp = $aArray[$i][$j][$k][$l][$m][$n][$o]
$aArray[$i][$j][$k][$l][$m][$n][$o] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]] = $vTemp
Case 8
$vTemp = $aArray[$i][$j][$k][$l][$m][$n][$o][$p]
$aArray[$i][$j][$k][$l][$m][$n][$o][$p] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]] = $vTemp
Case 9
$vTemp = $aArray[$i][$j][$k][$l][$m][$n][$o][$p][$q]
$aArray[$i][$j][$k][$l][$m][$n][$o][$p][$q] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]][$a[9]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]][$a[9]] = $vTemp
Case 10
$vTemp = $aArray[$i][$j][$k][$l][$m][$n][$o][$p][$q][$r]
$aArray[$i][$j][$k][$l][$m][$n][$o][$p][$q][$r] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]][$a[9]][$a[10]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]][$a[9]][$a[10]] = $vTemp
Case 11
$vTemp = $aArray[$i][$j][$k][$l][$m][$n][$o][$p][$q][$r][$s]
$aArray[$i][$j][$k][$l][$m][$n][$o][$p][$q][$r][$s] = $aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]][$a[9]][$a[10]][$a[11]]
$aArray[$a[1]][$a[2]][$a[3]][$a[4]][$a[5]][$a[6]][$a[7]][$a[8]][$a[9]][$a[10]][$a[11]] = $vTemp
EndSwitch
EndFunc
Func _MDA_Shuffle(ByRef $array)
Local $iRows = UBound($array)
Local $iCols = UBound($array, 2)
If $iRows * $iCols >= 16777216 Then
Return SetError(1)
EndIf
Local $a1D[$iRows * $iCols]
Local $iIndex1D = 0
For $iR = 0 To $iRows - 1
For $iC = 0 To $iCols - 1
$a1D[$iIndex1D] = $array[$iR][$iC]
$iIndex1D += 1
Next
Next
_ArrayShuffle($a1D)
$iIndex1D = 0
For $iR = 0 To $iRows - 1
For $iC = 0 To $iCols - 1
$array[$iR][$iC] = $a1D[$iIndex1D]
$iIndex1D += 1
Next
Next
EndFunc ;==>_MDA_Shuffle