Well I can understand what you are trying to do, I dont believe its possible to concatenate variable names.
And I believe what you want to do is check the doors and check if they are closed or not, for this you can do a dictionary with each door name like this:
local doors = {}
doors["door1"] = false --Closed
doors["door2"] = true --Open