The terms are technically different in New Mexico. "Law Enforcement Officers" include the District Attorney and his/her assistant prosecutors and the Attorney General and her/his attorney assistants. District Attorneys are the chief law enforcement officers of their districts and they and their attorney assistants carry badges. However...the DA and assistants and the AG and assistants do not have the power of arrest. They have no authority to serve writs or warrants and they are not empowered to use physical force to keep the peace. Only those law enforcement officers who are commissioned as "Peace Officers" may do these things. All State Court Judges are also "Conservators of the Peace" but I have no idea what that means. Finally, all good cops are two thirds social worker and they will tell you that up front. Here in New Mexico we have a LOT of good cops!
And there are different categories in Pennsylvania too e.g. there are statutory differences (and levels of authority) between a police officer, a peace officer and a few other terms. The term law enforcement officer (LEO) has become a nationwide buzzword that generally means that a person has arrest or apprehension authority.
In California, I believe that the operative term in state law is "peace officer". There are dozens of categories of peace officers, ranging from sworn officers in police and sheriffs departments, through district attorney's investigators, parole officers, correctional officers, UC and CSU campus police, through tax agents, welfare fraud investigators, harbor masters, state firefighters, state park rangers and fish-and-game wardens. You name it, they have at least some police powers: Investigators from the horse racing board, certain DMV employees, alcoholic beverage control (and probably the new cannabis control board), certain employees of the state lottery, even investigators of the state dental licensing board! National Guardsmen are also peace officers when on certain kinds of duty. So for the general public, it's perhaps safest assuming that if somebody is a government employee, they might have the power to arrest you even if they aren't obviously a "peace officer". http://leginfo.legislature.ca.gov/faces/codes_displaySection.xhtml?lawCode=PEN§ionNum=836.5 Many of them don't carry firearms and don't take POST training. They all have dramatically different scope of authority but that seems to basically be a function of the policy of the agency that employs them and the applicable state laws and regulations for that particular agency. There's also a host of categories that aren't considered California peace officers, mainly because their authority does not extend to the entire state, but who are legally allowed to exercise some of the powers of peace officers within their scope of employment. These include tribal police officers on Indian reservations (many of these are reserve sheriff's deputies and hence are peace officers), campus police at private universities and local animal control officers. It's all laid out here: http://leginfo.legislature.ca.gov/faces/codes_displayText.xhtml?chapter=4.5.&part=2.&lawCode=PEN&title=3. Within the state and local governments and among government employees, the big distinction is between those who have had POST (Peace Officer Standards and Training) training and who carry a firearm, and those who don't. https://www.post.ca.gov/about-us.aspx
What Ellifritz is describing is much like how wise beat cops used to operate in NYC. They would get to know the people, especially the young males who cause the most trouble. Those young males would better behave themselves if they liked and respected the beat cops.