Yeah, Shadow Temple definitely comes to mind. I mean... there are all sorts of torture devices decorating the walls and floors of that place. So, that's not necessarily a prison per se, but more like... an asylum. Who knows what actually went on in there, but I'm sure it's haunted by the spirits of those who lost their lives there, ha. It's common for ghost stories to tell about old abandoned sanatoriums and whatnot having paranormal activity like that (whether or not that's actually true, of course, is up for debate), so it's fairly safe to say that's the case with the Shadow Temple. So, I'm somewhat certain that in Hyrule's early history, those who committed treason against the monarchy were likely sent there for... isolation.
And as Himura mentioned, castles usually do have dungeons. I'm sure those who've committed minor crimes will be held beneath Hyrule Castle. Hyrule--especially around the time period of Ocarina of Time--kind of has somewhat medieval values. Castle dungeon will hold criminals for punishment, sure, but in most cases that's a temporary thing. There are some instances in history where people would be left to rot in a dungeon, but I can't imagine that happening in Hyrule Castle. That's probably where the Shadow Temple comes in... It's a more permanent punishment.
Last but not least, the Arbiters Grounds, to me, never really seemed like a prison. More like a place for beatings/executions. Like, I could see people, in old practice, being tied up and scourged for crimes. The Gerudo Desert is pretty much abandoned at that point in time, so it's pretty out of the way. Optimum location for a place like that. Civilization won't have to hear screams or anything. How convenient.