The way @Seamus has drawn the schematic is wrong, I'm afraid. It shorts pin 16 with pin 9. That means the purpose of the fly-back diode is gone.
Why is pin 9 of the ULN so important in case of a ULN2003? When you connect an inductive device between a pin of the ULN (here: pin 16) and the power supply (here: 24V) energy is built up in the coil (every inductive device, e.g. a motor, has a coil-alike behaviour) whenever the inductive load (a motor in the OP's example) is switched on.
When you switch off the inductive load then the energy that is built up into the coil has to go somewhere. It has to be consumed one way or another. If no precautions are taken, then that energy will be consumed over the output stage of the ULN, which is bad since that energy can be a high voltage spike (much higher than the allowed 50V that can be handled by the Darlington output stage of the ULN). And that can damage the output stage or any other electronic component that might be in the circuit.
To avoid damage, a reverse-polarised diode should be put between the power supply (to be connected to the cathode of the diode) and the output stage (connected to the anode of the diode). And that's exactly what pin 9 is used for. It's connecting all the cathodes of the 8 internal diodes to a "common" point. Here, this should be the power supply.
So, when connected correctly, the ULN will put the fly-back diode in a reversed way over the inductive load. As a result, the energy stored in the inductive load will be consumed by the inductive load itself whenever the circuit opens and not by other components in the chain which could be damaged if you're unlucky.
A correct connection is like so:
Note that in the schematics a ULN2803 is used. That's why you see pins 17 and 18 as extra compared to the ULN2003. The only difference between ULN2003 and ULN2803 is that the former has 7 output stages while the latter has 8.
And since I've used a ULN2803 and not an ULN2003 in my example (didn't have a ULN2003 component in my KiCAD library, hence...) the common pin is not pin 9, but pin 10!
For the rest, the devices are the same with respect to their functionality (pin numbers might differ too, of course).

A representation of the internals of the ULN might make it eve more clear:

- Q1 represents one of the 7 Darlington stages of the ULN2003
- D1 represents one of the 7 fly-back diodes in the ULN2003
@JohnKlein: Hope this answers your question.