This set me thinking about writing a replacement ascan, and a function to convert aa[bb,cc,dd] format arrays to aa[bb][cc][dd] format.

One of the problems is working out the size of the array. This UDF does the job quite well, but it won't get arrays with undefined dimension. It returns an array where each element is the size of the corresponding dimension in the input array:
Code:
Dim $a[10,20,1,2,3]

$aResult=udfArraySize($a)
"Array has "+(1+UBound($aResult))+" dimensions which are: $$a["+Join($aResult,",")+"]"?

Exit 0

Function udfArraySize($a)
Dim $iMaxArray $iMaxArray=20
Dim $i

For $i=1 To $iMaxArray
If UBound($a,$i)>0
Redim Preserve $udfArraySize[$i-1]
$udfArraySize[$i-1]=UBound($a,$i)
EndIf
Next
EndFunction