Just to embellish a bit on what janbo said...
If you use the old method, your array automagically becomes a global, whereas with the new method it is treated like any other variable or datatype, and will only work within the scope it was defined or/and passed into.
So whilst this will result in an error:
myArray as integer[10]
doStuff()
for i = 0 to 9
print(str(myArray[i])
sync()
sleep(100)
next i
function doStuff()
for i = 0 to 9
myArray[i] = i
next i
endFunction
The following code however will pass myArray to the function. Unlike datatypes, where you pass by referencing the name of the datatype, with arrays, you need say of what type it is (integer, string, float) followed by [] to signify it is an array when declaring it in the function-header.
myArray as integer[10]
doStuff(myArray)
for i = 0 to 9
print(str(myArray[i]))
sync()
sleep(100)
next i
function doStuff(myArray ref as integer[])
for i = 0 to 9
myArray[i] = i
next i
endFunction
You could of course also just define your array to be global like so:
global myArray as integer[10]
doStuff()
for i = 0 to 9
print(str(myArray[i]))
sync()
sleep(100)
next i
function doStuff()
for i = 0 to 9
myArray[i] = i
next i
endFunction
But globals can be a problem in larger projects. For smaller projects, it's fine.