Magic Cake Strips?
You can get them at most kitchen or cake baking supply stores or catalogues, or a Hobby store like Joanns, Michael or Hobby Lobby. You can also make your own with old diapers, dish towels or terry cloth - cut it into strips and soak them, wring them out and wrap them around the pans. I haven't seen any for cupcakes. You can wrap them around other shapes like rectangles, squares, ovals, or hearts. Another solution for you could be just to cut cut cardboard the size you want and press down on the still warm cake to flatten it. This could work for cupcakes, if you are NOT filling the holes up so much the cupcakes dome over the top. Most cake decorators who need flat layers, will slice off the top (torting) of each cake layer. Magic strips are not practical for large baking operations.
The strips do help keep the cake somewhat flat, but they also help with over cooked edges.