What you want to do then are loops, for loops. You should study them, since they are very useful.
You can easily loop through an entire array by typing something like this:
for key,value in pairs(tier1EQ) do
get1 = getTileItemById(itemPos1, value)
end
It will then get the tile item id of...