Accidentally ran chmod -R 777 /? So I was going to type something else with chmod but I ended up typing chmod -R 777 / but the good thing is I ran this in an unrooted Samsung j7 prime so it had a read only file-system and running android 7 and after I ran it I immediately killed it with ^C and I read output which said permission denied for many files. I also ran chown the came same way like this for fun a few days ago. Everything runs fine I even rebooted but should I worry about a problem with my device?
I'd worry a lot – because what you did is equivalent to opening all doors and windows in your house wide, and then go sleep. The entire world (figuratively spoken) now has access to everything the chmod managed to touch. Not having run it as root might mean damage is not that extensive – but it could still be enough for the one or other mishap.

To fix up what might have been broken, unfortunately the only safe way is a factory-reset – as it's hard to say which files/directories have been changed and even harder what their previous "access levels" were.