Computing arrayindex

As i think my problem is a mathematical one I post it here, if I should be somewhere else please tell me where.

I have a multiple array (5 or 6 dimensions each being of same size) where only elements with different indexcombinations are being filled (i.e. if element [1,2,3,4,5,6] being filled element [6,5,4,3,2,1] will NOT be filled) so I want to store all elements of such a multiple array in a lineairarray and compute the indexes for each element as it saves a lot of memory.

As i think my problem is a mathematical one I post it here, if I should be somewhere else please tell me where.

I have a multiple array (5 or 6 dimensions each being of same size) where only elements with different indexcombinations are being filled (i.e. if element [1,2,3,4,5,6] being filled element [6,5,4,3,2,1] will NOT be filled) so I want to store all elements of such a multiple array in a lineairarray and compute the indexes for each element as it saves a lot of memory.

(I would consider using some other type of structure for this data, maybe a linked list
with each record holding the indices and the value)

RonL

As to me element (1,2,3,4,5,6) is the same like (3,1,5,6,2,4) or any other combination of those indeces and I created and counted the elements (output in Excel, I checked the numbers) I actually SEE MaxIndex being that value.

Using linked lists will double (at least) the memory usage and also (at least) lookup time (important as I have to access the elements millions of times).
What I actually want is being able to calculate the position of each individual element so that for a given combination of indices I can retrieve the individual element very fast without the need for SEARCHING.

I managed to calculate the index of ANY combination in a list by using combinadics and its speed is very good (and independent of the element to lookup) and actually much better compared to binary searching the list even for rather small lists.
Information leading to solving the problem has been obtained from Combinadic - Wikipedia, the free encyclopedia