Newbie - to coding and to the arduino ... needs some assistance

Hello Everyone. I am trying to create a project at home which is more advanced than what my current programming experience will allow me. I have hard coded information before, but this time i am wanting to use arrays to 'simplify' / shorten the code. whilst i could just hard code what i want in a few days, it would defeat the idea of this project. I am wanting to create a system that will 'sleep' until an event occurs (a door switch). at the point of an event being registered, i want particular parts of the code to run, depending on what door switch has been activated. is this possible with the arduino ?

thanks for your assistance