Where to place decoupling capacitor
You probably want the cap on (or near) the motor.  The main purpose of the cap, there, is not to protect anything from ripple current, since neither the motor nor (probably) the output side of the IC, is particularly sensitive to it, but rather to reduce the stray rf caused by the commutation of the motor.  Placing the capacitor near the motor means only a short region of the leads between the driver source and the motor is experiencing much ripple, and so there's less rf interference.

As for other places to use smoothing capacitors, the best option is to just hook everything up, turn it all on, and probe around sensitive areas (IC signal and power inputs, mainly) with an Oscilliscope and add enough capacitance to drop undesirable ripple to a few millivolts (or whatever the circuit requires).