You can't use an array like that. You want to use a dictionary:
Code:
groups = {
[1] = {
["FlameShock"] = true,
["EarthShock"] = true,
["LavaBurst"] = true,
["Earthquake"] = true,
["ElementalBlast"] = true,
},
...
},
Then to remove it you would do:
Code:
groups[1]["LavaBurst"] = false
Don't set it to nil or the default will kick in.
I would suggest posting all of your code because it looks like you could make your options more efficient.