I loathe HOAs and, if we ever move, will never live in a neighborhood controlled by these "rulers of the masses". In answer to your question, however, North Carolina and several other states authorize "Special Police". These officers are BLET certified and, on private property, to which they are contracted, have the powers of arrest.
Frequently they wear blue uniforms and in all cases that I know of, are armed. I think that most of them do a good job, but, just like everything else, there is a downside.
In neighborhoods that have not turned the streets over to a government agency - private streets, these Special Police can patrol and issue citations. A gated community would be a good example of such a neighborhood.
Most of the ones that I know about have a good working relationship with the local PD and, in many cases, are welcomed as taking a burden from an already overburdened municipal department.