I am not certain exactly what info you are looking for, but this is a starting point. https://www.nps.gov/civilwar/soldiers-and-sailors-database.htm
After you ID which unit your ancestor was in, you can check records to see if this unit was attached to the army in question.
GP