I can't help with the US jurisdiction.
Section 6 of the NSW Police Act 1990 says:
6 Mission and functions of NSW Police Force
(1) The mission of the NSW Police Force is to work with the community to reduce violence, crime and fear.
(2) The NSW Police Force has the following functions:
(a) to provide police services for New South Wales,
(b) to exercise any other function conferred on it by or under this or any other Act,
(c) to do anything necessary for, or incidental to, the exercise of its functions.
(3) In this section:
"police services" includes:
(a) services by way of prevention and detection of crime, and
(b) the protection of persons from injury or death, and property from damage, whether arising from criminal acts or in any other way, and
(c) the provision of essential services in emergencies, and
(d) any other service prescribed by the regulations.
(4) A reference in this section to the functions of the NSW Police Force includes a reference to the functions of members of the NSW Police Force.
(5) The provision of police services in emergencies and rescue operations is subject to the State Emergency and Rescue Management Act 1989 and to the Essential Services Act 1988 .
(6) Nothing in this section confers on the NSW Police Force a power to provide a police service in a way that is inconsistent with any provisions applicable to police officers under the Law Enforcement (Powers and Responsibilities) Act 2002.
S 6(2)(c) "to do anything necessary for, or incidental to, the exercise of its functions" is a very wide grant of powers. Basically they are permitted to do anything except for things they are prohibited from doing or are required to do in a certain way under this Act and the other named Acts. The Law Enforcement (Powers and Responsibilities) Act 2002 brings in another dozen or so acts. If you read through those (I have only skimmed them); they specifically introduce the common law as part of what is permitted and prohibited.
So, without going through chapter and verse, if something isn't covered by the various statutes and has not become part of the common law by reason of precedent then the common law standard applies: if it is reasonable for them to execute their function of policing then it is legal.