You don't really have source. The Walter E Williams you cite, I think, is not an academic historian. He's a conservative economist with a national by-line who is notorious for making claims about things of which he has no special knowledge or insight.

There is really no evidence to suggest that black troops did anything but menial, manual labor for Confederate troops, just as they did for their masters. Rather, the entire South feared the possibility of slave revolts for 50 years before the Civil War, after the Haitian Revolution, so the notion that significant numbers of them would have served under the South under arms is more than a little counterintuitive.

There was something like 222,000 black men in Union forces. About 40,000 of them DIED, all this according to the National Archives. 18 of them won the Congressional Medal of Honor.

https://www.archives.gov/education/lessons/blacks-civil-war