What Nick is saying is that you want a "bookkeeping" table rather than a "bag of data" table. (My own terminology that I invented just now for you. Don't bother looking it up.)
A bag of data is of the form:
data = {}
table.insert(data, "hello")
table.insert(data, "ocelot")
table.insert(data, "potato masher")
A bookkeeping table is of the form:
data = {}
data["hello"] = "data about hello"
data["ocelot"] = "data about ocelot"
data["potato masher"] = "data about potato masher"
In the bookkeeping table, you will only ever have one instance of "data about potato masher" because you can only have one "potato masher" key in your table.
If you try to assign "data about a different potato masher" to data["potato masher"] it will overwrite the first one and you will still only have one.
If you want to prevent overwriting and always keep the first one you add, you can instead do all your assignments as
data["potato masher"] = data["potato masher"] or "data about potato masher"
This works because data["potato masher"] on the right side of the equal sign is nil if it has not yet been assigned and the value if it has, and because of how Lua handles nil and strings in boolean logic.
The more explicit form of this is:
if data["potato masher"] == nil then
data["potato masher"] = "data about potato masher"
end