So, clearing the battlefield. Did the soldiers have ID on them? Something like a disk or a paybook? If not, it would have been a dire job trying to identify those killed.
It would have had to be the corporals and the sergeants job to identify them - they knew their guys. Many would have been disfigured. Clearing the injured would have been just as bad for the bandsmen - acting as stretcherbearers. i suspect most would have been beyond help, barely alive after losing so much blood and so long after the 'victory'. The dead were left until the next day. I suspect there was little identification of dead after a battle.
Then you have the enemy dead. There was no Geneva Convention about them, especially in a civil war of any nation. Weapons would have been collected and stored - especially if they were better than the ones you had, but I suspect that was about it. There will have been some 'looting' - searching the bodies for valubles. Then dig some deep holes - they had to be deep since wild hogs LOVE an easy meal - or find some old trenches. It was often the local civilians who did that - often against their will if the army was still there. More often, the army moved on leaving the civvies to clear up.
Even dead bodies have their uses. Apparently after Waterloo (1815), the dead were buried in mass graves, but recent excavations have not found many complete skeletons. The current theory is that the locals dug up the bones and ground them to be processed for fertilizer!
Try:
https://www.britannica.com/video/195083/Overview-engagements-Battle-of-Gettysburg-American-Civil