We know the dwarves were prisoners of king Thranduil, who or what else do you think could also have been in the dungeons of Thranduil while the dwarves were held captive?
I think there could have been some goblins, perhaps some men that got lost in Mirkwood.
The Wood-elves keeping prisoners for any real length of time seems to have been a pretty rare occurrence. They don't seem to have maintained a formal dungeon. What cells they did have were scattered between different parts of Thranduil's palace. There's not really any evidence that Thranduil was keeping any other prisoners at the time of the Dwarves' incarceration. Woodmen most likely went out of their way to avoid the Woodland Realm, though a goblin or three might have been caught spying or making mischief against the elves.
I doubt the elves would keep goblins prisoner; they'd probably execute them on the spot instead.
While listening to the audio version of the hobbit, I believe it specifically said they do keep goblin prisoners at times. Maybe only a short time though I'm guessing.
If we go by what's written in The Hobbit, the only enemies that the Wood-elves treated consistently without mercy were the giant spiders of Mirkwood.