Controlling DC motors with PWM in MCU
You can make this work.
Depends on your requirements. Roughly you'll need 1 pwm per motor with speed control and one gpio per direction. Fancy control would need one pwm per drive transistor.
Those are freewheeling diodes to give a conduction path for the motor inductance when the drive transistor turns off. It bleeds off energy stored in the inductance and armature inertia.