I’m not going to comment on whether he should be in a playpen or not at his age and for how long, I’m leaving that to your judgment as a parent.
As for the behaviour and the ‘no’ not working, I’ve found with both of mine - and there’s research showing this - that ‘no’ rarely works with little ones. Mostly because they so often put themselves in situations where you have to use the word ‘no’ that it eventually loses all meaning.
It also doesn’t tell them what you want them to do instead. The way their brain works at this age is that they need clear instructions. You saying ‘no’ doesn’t achieve that. What I would do instead is focus on the result you want: let’s leave the mats in the playpen, that’s where they’re supposed to be. Let’s keep the toys in the playpen so it’s easier to get them when we want to play with them. Let’s leave the buttons, they are not meant to be pushed all the time. If he keeps throwing toys for example you can calmly remove them and say ‘I can’t let you throw the toys, you might hurt someone/break something’. If he cries and you give him the toys back always explain before giving them back: ‘I can put them back, but you have to leave them in the playpen’.
And always repeat the positive rather than the negative. It gives them a clear instruction of what you want to happen and it doesn’t repeat the word ‘no’ or ‘don’t’ so much that it doesn’t mean anything to them anymore. ‘Leave’ rather than ‘don’t throw/push/pull’.
And most importantly, as hard as this may be most of the time, do all of this without emotion and reaction. You reacting is also something that will make them want to do whatever they’re doing even more. Stay calm and focus on the actions you want to see.
Hope you find this helpful!