Full class consequence is NOT "best practice" and there is no research supporting it.
Agree. And, sometimes, teachers make mistakes. I was a teacher. Here's my take:
The "head on the desk" thing is okay. If the class was out of control, she needed to calm things down and get control (I am assuming this was a short minute--not an extended period of time.) This is not so much a punishment as a calming tactic--unless it went on for a very long time. I frequently used this when things would noisy and out of hand--I'd just say "heads down" and then when things got quiet, say "okay, back to work." It was a way to get attention--not a punishment.
The "walking laps" is really not okay, but I'd give her a pass if it is a one-off. And, if she is a new teacher, she may still be working through this. That said, my DD had a fifth grade teacher who had the kids do this every day after lunch--but, it was not their recess--it was more of a "health break." It was definitely now punishment (although some may have seen it that way.!) That teacher was really into teaching good health habits.