You can design a new unit and place it in the upgrade series, produce a replacement formation, and tick the checkbox to use that replacement formation - the existing unit will then swap 'gear' with the replacement formation.
There is no way to just upgrade units in an existing formation from an equipment stockpile like you would in Hearts of Iron - I wish there was as it would make the whole process a lot more simple.