help connecting Arduino UNO to n-ch MOSFET via Optocoupler

Supply decoupling in the form of capacitors is always a good idea
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Replace the 7.5V supply with the 24V one and have a separate resistor of 1K going from each opto collector to the +24V. In that way then the opto is turned on the FET only gets a proportion of the 24V determined by 1K and 470R in a potential divider.