While correcting errors in someone else's code, I decided to completely rewrite the original script, and improve upon it.
This is the basic code for making 3D arrays using dictionaries.
ar = { (x,y,z):0 # creating the array
for x in range(3)
for y in range (3)
for z in range (3)}
ar [2,1,0] = 777 # random value
ar [2,2,1] = 2345 # random value
for x in sorted(ar): #output
print(str(x) + " --- " + str(ar[x])) #print output