As past experience has showed me you need to consider the possibility that you are putting incidents from different episodes together. I still remember how a poster that was looking for a movie told us in his OP that an specific movie was **not **the one having the scene that he was remembering, it turned out that the scene was in that movie.
Even I got many of those memories mixed, it is really a trip to look at many scenes that one thinks that are remembered so well in youtube or netflix and be surprised at the details that one missed or added.
It is entirely possible that I confabulated or just plain made up the memory. I just wanted to check my other options before I simply assumed that I made it all up.
I could have sworn there is an episode of Voyager where Harry Kim is locked in a cell and the camera pulls back through his window to reveal thousands and thousands of other cells. Blanking on the episode though.