Nope: most NYC civil servants are required to live in the city, but the police are allowed to live in the neighboring suburbs[1]. The majority live outside of the city[2], with most commuting in by car (and then parking on the sidewalks of the neighborhoods they ostensibly serve[3]).
[1]: https://www.nyc.gov/site/nypd/careers/police-officers/po-hir...
[2]: https://gothamist.com/news/majority-nypd-officers-dont-live-...
[3]: https://twitter.com/NYPD_Parking