Controlling large number of 24VDC lights / switches with Arduino

Google how to use optocouplers, how to drive them, where and how to connect the load etc. Schematic is not good. Btw this is fun project, enjoy!