Problem with Arduino + Solenoid

Capacitors are what is used for decoupling. It helps clean up the power supply to the ic.

What you say are decouplers are actually optoisolators. They are used to physically seperate 2 circuits for a few different reasons, png the logic circuits from transients is one, but you seemed to negated them by connecting the power supply and ground to both circuits.

As for the before/after diagrams......point out the changes. It's like a game of "where's Waldo".

You also don't show the solenoid hookups either. They require a diode across them, just like the relay coils and motors, which are all bad about putting voltage spikes on the power supply, and you have all of them hooked to yours along with the uC without decoupling capacitors.