Is there a way to make the collision detection follow a array instead the set modes?

or maybe not even an array . just a variable will do .