“I thougth Sherriffs were pretty much the highest authority when it came to law enforcement. What state agency arrested him?”
In Texas, a constable can arrest a sheriff. I know that because it was pointed out to me by a constable in a Texas county where I lived.
In Texas any peace officer can arrest the Sheriff. Traditionally his own Deputies do not, if for no other reason he can fire them if they attempt to do so, and then they are no longer Deputies, but civilians. ; )
When the Winkler County Sheriff was indicted a few years ago, he surrendered himself at his own jail, to be booked.
I know some states restrict who can arrest the Sheriff, and Texas may have in the past. As a practical matter, back when the only State peace officers were a handful of Rangers, and Police Departments were limited to a few big cities, there were undoubtedly many counties where the only peace officer who could arrest the sheriff was the Constable, because he was the only peace officer that was not a a Deputy.