You might be thinking of something like the old experiments showing the self-destructive behavior of animals restrained to fairly small areas with no mental stimulation.
Here's a relevant TED talk. See especially the section around 3:25:
You get a rat and you put it in a cage, and you give it two water bottles: One is just water, and the other is water laced with either heroin or cocaine. If you do that, the rat will almost always prefer the drug water and almost always kill itself quite quickly. So there you go, right? That's how we think it works. In the '70s, Professor Alexander comes along and he looks at this experiment and he noticed something. He said ah, we're putting the rat in an empty cage. It's got nothing to do except use these drugs. Let's try something different. So Professor Alexander built a cage that he called "Rat Park," which is basically heaven for rats. They've got loads of cheese, they've got loads of colored balls, they've got loads of tunnels. Crucially, they've got loads of friends. They can have loads of sex. And they've got both the water bottles, the normal water and the drugged water. But here's the fascinating thing: In Rat Park, they don't like the drug water. They almost never use it. None of them ever use it compulsively. None of them ever overdose. You go from almost 100 percent overdose when they're isolated to zero percent overdose when they have happy and connected lives.
So don't worry about the playpen. It can be a good way to keep the child within safe bounds and explore and try new things without getting hurt, which teaches the kid to not fear trying things that might not work out. If there are stimulating toys and important social connections, that's the important part.
Another thing I was thinking was, what if I sit in the playpen and play with her?
Yes, do this. The main concerns that seem to underly your question are those things that can result from leaving the kid alone for long periods without much stimulation or opportunity to learn, even if the kid is not in a playpen.