First and foremost, people’s bodies are private and they have the right to control them. Wanting to touch someone does not entitle you to touch them.
Even if they are the same gender as you. Even if you have no sexual intent. Even if you feel really strongly that you need to be touched.
Even if they’ve accepted certain kinds of touch from you in the past. They are entitled to change their mind, and sometimes people do.
Do not pat someone’s head just because you think they are adorable, unless you have an existing relationship in which that is potentially appropriate *and* you know that person consents. Adorable humans are people with full rights to physical autonomy, but they’re often treated as though they’re doing something bad if they object to others touching them. Don’t be part of this problem.
Clothes someone is wearing (including hats), things they are carrying, jewelry, and anything similar to that are all part of personal space.
This *especially* applies to mobility equipment. Don’t touch someone’s wheelchair or other equipment without having been invited to do so, unless the situation is one in which grabbing someone’s body without explicit permission would be the right thing to do (for instance, pulling someone away from an oncoming train). This applies even if you are assisting someone and there is a legitimate reason touching their chair would be helpful – accepting help doesn’t mean someone gives up all bodily autonomy; ask first. Wheelchairs and other mobility devices are part of a person’s physical space.