Your specific examples are kind of weird. Because on aggregate, they don’t happen. Hydroxide (HO) is an ion that occurs in water at varying concentrations depending on it’s level on the pH scale, but you don’t decompose water in a reaction into hydroxide. Similarly, hydrogen peroxide (H2O2) also isn’t made from water. It’s made from the reactions of H2 and O2 in specific ways to make sure that you don’t accidentally make water.
In general though, yeah, chemical reactions can be set up in a lab, and the specifics depend on what reaction you’re doing, and the equipment you have.
Latest Answers