I keep seeing around social media that modern policing derives from slave patrols thus are inherently racist. Is there any truth in this or a bit of a stretch?
No. The first police department was established in Boston, MA in 1838, slavery having been abolished there in 1783. The police force, and those to come after, were modeled after the police force created in 1829 England.
Johnson, David R. American Law Enforcement: A History. Wheeling, IL: Forum Press, 1981.