What did the Union Army do with slaves that came into its lines?
Re-enslaved them into service of the Union army.
Slaves were not free until the 13th Amendment. That was after the war.