Yes. Once a Unit Buff (Unit Attack, Unit Defense, Unit Health) is activated, it takes effect on all of your armies regardless where they are, inside or outside of your city.
The only exception is the Unit *March Speed* Buff. It does not apply to the armies that are already in marching. Only marches, that are sent after the March Speed Buff is activated, will benefit from the buff.