I think the only time it would not be rude to pat someone on the head, is if it were a very small child in your care or with whom you have an affectionate relationship, or a grown person you are very closely related with (in a jokey way) - spouse, parent, sibling. Of course you have to temper that with their feedback and if they don't like it you should not do it again.
Touching strangers in a non-emergency - always rude. Treating disabled people the way you would treat a child - extremely rude.
I'd go for this too. I was once patted on the head by someone shortly after I had started work, some 40 years ago. The man was a Professor and a living legend in his field, and he had said you don't know who I am, (not at all arrogantly we were at an office party and someone said "Do you know Scotcat" and he said "Yes, but she doesn't know who I am," When I said "You are Professor A" he smiled and gave me an avuncular type pat on the head, pleased I knew him. However, because he was such a sweetie, I took it. Anyone else... well there were those who I cringed if they even walked into the room.