Some consider a hug sexual harassment, some consider touching a knee. What about putting your hand on a person's back? Does it make a difference what part of their back, if so exactly how and where?
Sexual harassment should be far more about intention rather than the specific part of the body touched (excluding the obvious no-go areas of genitals and breasts). Generally you should be allowed 1 strike, for mis-reading signals.
In a society where men are expected to initiate contact, this is a fraught situation.
It is not a simple answer.
Can you imagine the following scene:
"Gee John, you did a great job there, I would like to shake your hand, or even pat your back (only near the shoulder mind you and no lower than a line formed by the bottom of your shoulder blades). Do you think that would be permissible? I want to reassure you that this touch will not be sexual in any way."
As for patting backs, do avoid doing so. Many of us don't like it even if it's totally non-sexual.
...and many of us do like being patted on the back (non-condescending of course).
Perhaps in the future, we will all have to work in an environment where no touching of any sort is allowed, ever, but I can't help thinking that would be a step backwards.
The couples who found sex and/or love (and even marriage) in the workplace, would argue that it's appropriate.
It's only when it happens against the other's will that's inappropriate.
Merely some office decree saying it's not appropriate doesn't make it so (and if two people click, it won't fight human nature to connect, including in this way, anyway, people will do what they do).