Replacing light switches and outlets without electrical boxes
I hear where you're coming from; those blue plastic boxes are awfully deep, and are designed to use all the depth of a 2x4, which is not there in a manufactured home because it would make the walls too thick. 

Use metal boxes

A standard 4”x4” steel box is 1-1/2” deep and gives 22 cubic inches (room for four /2 cables plus a receptacle or switch). 

A deep 4x4 box is 2-1/8” deep.  You can put a 1-gang mud ring or plate on either one.   

They also make true 1-gang metal handy-boxes, but they are awfully small on cubic inches - they only have room for a receptacle/switch and 1 cable, typically.  

If feasible, insert a spacer block so you can screw the spacer to a joist and the box to the spacer.

Grounding things

Metal boxes have a ground screws site intended for a #10-32 screw. They sell adorable little green screws with or without pigtail.  Grounds coming into the box must be pigtailed to this.  If the box is grounded this way, switches do not need a pigtail and can ground through the mounting screws. Receptacles need a pigtail, though, unless the have a hard-flush, bolt-down connection between their yoke and the metal box, unless they are a "self-grounding" type.