Darlington array: How to output desired voltage at uln2803a driver colectors?
On page 9 of the datasheet you linked, you can find this very convenient example of a single gate found in the ULN2803A:



This is an NPN Darlington arrangement. (You really should become familiar with it, if you aren't already. The usual behavioral example will have the two BJTs arranged that way but may not include all those diodes and resistors.) The left NPN drives the right NPN and it's not uncommon to hear the right NPN called the output BJT and the left NPN called the driver BJT. Regardless, the effect is that for switching relatively high BJT collector-to-emitter currents, the output BJT will need substantial excess base current and one way to help do that is to add the left side BJT so that it can supply that substantial excess base current while itself requiring far less base current.

That was a long sentence at the end. So put more quickly, imagine the right BJT will can handle \$250\:\text{mA}\$ as the output current. But to do that, it needs \$10\:\text{mA}\$ of base current (as a hypothetical.) To further reduce that need, the left BJT is added. It can deliver \$10\:\text{mA}\$ to the right BJT, but it will only need, say, \$1\:\text{mA}\$ of base current. So combining the two means \$\frac1{10}\$th what otherwise might be needed for base drive current. That can be an advantage worth the trouble, at times.

One thing that is very important for this particular buffered inverter gate is that since it uses NPN BJTs and since the emitter side is tied to the lowest voltage (ground), the output cannot ever source current. It can only sink current. This means that it cannot drive \$12\:\text{V}\$ -- instead, when it is active, it actively drives \$1\:\text{V}\$ or so. (Not \$0\:\text{V}\$ because the two BJTs use up [or require, to operate] about one volt. So you can't affect that. You have to accept the loss of it.) Another way of saying this is that the output can sink current, but that in doing so the output voltage rises upward away from ground by about a volt. This is NOT a good thing. It's just a necessary evil with this circuit. You can see this effect in the datasheet:



In your case, for \$I_\text{C}=100\:\text{mA}\$ (the top row) note that the typical value (middle column) shows \$0.9\:\text{V}\$ and that the worst case (right column) shows \$1.1\:\text{V}\$. (They don't show a minimum, not because it doesn't exist, but because as a designer you don't care about best cases. You want to know about worst cases, so you can plan for them.)

Above the first diagram I included here, read the following text:



Note that they tell you straight up that the inputs are designed for something between \$3.3\:\text{V}\$ and \$5.0\:\text{V}\$. You could probably directly use those voltages at the inputs. (Note the \$2.7\:\text{k}\Omega\$ resistor in the diagram, which will help limit the base drive currents? That's selected for those voltages.)

But if you want to use higher voltages to drive the input, this is a warning to think more. So let's go back to another part of that datasheet row I'd earlier mentioned. So you see that it mentions \$I_\text{I}=250\:\mu\text{A}\$? Well, that's the input current they need to meet the specifications they gave you. That's what you want to target.

Before jumping straight into that, let's take a look at another piece of the datasheet:



Here, the closest row to your case is for \$I_\text{C}=200\:\text{mA}\$. Note that the worst case is \$V_{I\left(\text{ON}\right)}=2.4\:\text{V}\$? This includes the drop across those resistors you saw, earlier. But it gives you an idea about what kind of series "limiting" resistor you will want to add to the circuit before applying \$12\:\text{V}\$ as a driving voltage to the input. We can compute this added series resistor as \$R=\frac{12\:\text{V}-2.4\:\text{V}}{250\:\mu\text{A}}=38.4\:\text{k}\Omega\$. That's the largest value you should consider. And if you wanted to make certain that you delivered more than they appear to request in the specification, say \$1\:\text{mA}\$, then \$R=\frac{12\:\text{V}-2.4\:\text{V}}{1\:\text{mA}}=9.6\:\text{k}\Omega\$. I'd recommended at least \$5.6\:\text{k}\Omega\$ in earlier comments, just to be sure. But I think you could safely use \$10\:\text{k}\Omega\$ and be fine.

The point here is that you look over the datasheet and try and pick out little details to help you think and to work out some kind of idea about how it works and to bracket the range of behavior so that you can decide if you need to add something and, if so, what kind of something to add.

The final circuit might look like:







simulate this circuit &ndash; Schematic created using CircuitLab

Note that you won't expect a full \$12\:\text{V}\$ across the relay coil. But most relays can operate at about 70% of their rated voltage. So I think this will be okay. Also note that I've been assuming you will be using \$+12\:\text{V}\$ as the active voltage of your control line. If you use a different voltage there, be sure to adjust the resistor value per the logic I gave above. Also, note that there is a lot of flexibility in the exact resistor value. So, you can feel some freedom to adjust its value to something you have on hand. Just don't make it too small or too large.



Jasen mentioned in a comment below that I'd neglected to discuss the diodes associated with the COM lead of the ULN2803A package. It's worth a short note. Since the ULN2803A is designed with the idea of driving relays and motors (among other things), which can possess substantial inductance, some pathway is needed to allow the stored magnetic energy to dissipate when the gate becomes inactive (and cannot provide a path.) One of the three indicated diodes is tied from the open collector output to the COM line for this purpose. This diode is called a "flyback" diode and usually tied to the positive rail voltage to which one side of the relay coil is also tied. When the gate is active (the relay coil is pulsed on or turned on, this flyback diode should be reverse-biased (simple inspection is usually enough to note this fact.) When the gate becomes inactive, the coil current will continue in the same direction but will start to decline as the relay coil suddenly forward-biases the flyback diode allowing its coil current to pass through the flyback diode while it declines back to zero.

If this diode were not present and no other alternative managed paths provided (snubbers, for example), then the relay coil voltage would still reverse itself but that voltage likely would be much larger -- enough so that the current would be able to find some unexpected/unmanaged path. It is much better to provide a managed path and this diode helps achieve that. (One might add additional components if a faster relay coil release is desired, though.)

The diodes from ground to the gate input and/or gate output is there to cover some typical drive cases where some capacitance might otherwise drive these pin voltages well below ground for a short moment. Providing the diodes allows such capacitance an "easy" path to discharge while also keeping the pins from falling too far below ground (limiting it to about one diode drop below ground and usually only for a very short time.)