Any of your units missing elements are eligible for replacement. While you do not get to target replacements to units, there are things you can do to enhance the probability of a unit receiving the replacement. Typically units need to be in or by a supply source equal to the element value of a stack.
For instance, If you have a unit which can hold say eight elements and it is by itself in a city with a supply value of eight or more, it ought to draw a replacement element. If you have more elements in a city than the supply value, these units will likely not drawn replacements.
Units inside cities and in passive posture, blue or green offensive stance are favored.
If I have the resources, I usually try to build replacements for each unit missing an element or more as each unit will only take one replacement at a time.
Replacements do not have a build time, they are fully active when drawn into the unit.
I have found it useful to have the unit drawing replacement stacked with a supply wagon.