Depends on the location. My understanding is that it is typically illegal but that enforcement can vary greatly from location to location. Places like Walmart are considered private property so the parking regulations are entirely up to them. I could see one store turning a blind eye but another calling the tow truck. Outside of mall type locations sidewalks fall under the control of the local city or township, and enforcement will come under police jurisdiction (I think!). But again it all depends on the prevailing attitude. Are people happy that you leave a space for a car or do they see you as flouting the rules?
In short, I would do as others do. If no-one else is parking on the sidewalks I would say you are taking a risk. It also depends on the bike as there is a big difference between a small scooter and a Gold Wing.
As for your helmet getting stolen, I wouldn’t think parking location is going to help much. Either invest in lockable luggage or a specialized helmet lock (or take it with you).