Your table is an indexed table; every value is automatically assigned an index number. Any kind of 'contains' function will use either a loop or a search algorithm to find the correct value.
If you set it up like this:
Code:
local myTable = {
["Value1"] = true,
["Value2"] = true,
["Value3"] = true,
}
Then you have a key-value table where your previous values serve as keys and the value is always true, so you can perform a lookup like this:
Code:
if myTable[someVariable] then ...