Well, what you tended to have happen was some form of community policing, and not in the modern sense, supplementing an undermanned official force. So for example, in Medieval England, the Ordinance of 1233 established royal night watchmen who were supposed to “to arrest those who enter [villages] at night and go about armed.” Those got supplemented by the Assize of Arms of 1252, which established local constables in every parish whose job it was to gather evidence for local justices, quell riots, and arrest lawbreakers and hand them over to the sheriffs.
However, the constables and watchmen were generally few in number. So they were given the authority through the Statute of Winchester of 1285 to make a “hue and cry,” i.e to draft any able-bodied man in earshot to help them pursue a criminal until that criminal was arrested. To put some teeth into this requirement, the entire community (known as a hundred of a shire) would be held legally responsible for any theft and robbery if they failed to catch said criminal.
And that was basically the dominant form of law enforcement in England up until the Bow Street Runners in 1749, the Glasgow City Police in 1800, and Peel’s Metropolitan Police Act of 1829.
In other words, legally sanctioned (indeed, legally mandated) vigilante justice.