Brian Rhinehart at Civil War Records (civilwarrecords.com) has done a great service to people researching their Civil War ancestors. He has posted a complete index to the court martial files at the National Archives!
Actually the index goes beyond the Civil War as it covers 1800 through 1876.
It also includes civilians.
Best of all, Mr. Rhinehart will retrieve the entire file for a reasonable fee. He provides a great service for those of us who can't get to the Archives ourselves.
The index is posted on his website. This link goes directly to the B names. Other letters are reached by clicking the appropriate letter at the bottom of the index. It may take a while to load as the file is quite large.
https://civilwarrecords.com/products/military-court-martial-file-deposit?mc_cid=a4c1cb55da
Here are the Bonnells and Bunnells listed (it's nice to see there are so few):
86552 Charles Bonnell, Pvt. 30th Inf. Co. I Sep 1863 Nashville, TN
86553 James Bonnell, Pvt 14th Inf Co. C, Jun 1862 New Bridge, VA
86554 John L. Bonnell, Lt. IL–102nd Inf Co. I, Sep 1863 Nashville, TN
811770 George W. Bunnell, Pvt OH-5th Cav Co. D, Aug 1865 Raleigh, NC
811771 Richard Bunnell, Conscript, Mar 1865 Philadelphia, PA