golden-eagle, actually what that cop is telling is probably legally true (although no one really cares, so it's simply un-enforced all over the USA). I mean, THINK of it: let's say that any of us, in any city in the entire USA, were to find a valuable diamond ring, or pristine 1916d merc, at the public park in our town. Imagine walking in to the city's lawyer or some desk-bound clerk, showing them the item, and saying "Hi, I found this on city property, and it's worth $1,000. Is it ok if I keep it for my own fun and profit, or does it belong to the city, since it was found on city property?". What do you think they're response would be? Of COURSE they are going to say "that belongs to the city", right?
Because you see, there is usually, in all cities, verbage in park rules that disallows "collecting" (or "harvesting" or some such phraseology). The reason is, because afterall, if that verbage wasn't there, what's to stop you or I from backing up our truck to the park, and taking all the tan-bark out of the kids playground area, to use in our own garden at home? Or to harvest all the roses out of the park's rose garden, to sell at the flea market? And all such park features belong to the city, not the individual (the turf, the trees, the play equipment, and so forth). But TECHNICALLY, there's nothing to stop that same verbage from applying to even individual coins, rings, and so forth. So technically, the officer is right.
Also at the state level, you are probably running afoul of "lost and found" laws. If you ever find an item over a given threshold value (usually $100 or $200), you are technically required to turn it in the local police, for proper lost & found procedures. And you won't get it back for 30 days, if no one claims it (and you may have to pay the cost of any lost & found ads they put in the paper, etc...).
And as for the other things he said to you "liability" and "safety", you have to understand that the laws are written in an ambiguous fluid enough way, so as to apply to a myriad of situations that may arise, in the field, in the course of law enforcement. I also used to think that there had to be specific working SPECIFICALLY saying "no metal detecting". Otherwise, it seemed arbitrary and capricuous, for some cop to simply say "you can do that, simply because I said so". Because this happened to me once, as well. So I took it up with a lawyer friend, and he alerted me that cops (or any duly appointed public representative) is actually given "latitude" to interpret/morph existing things, to apply as conditions merit, in the field. Because otherwise cops and rangers and city personell would be FOREVER playing and arguing semantics with people in the field. For example: you show up at a park wearing nothing but a single sock. A cop tries to boot you for being "nude". You argue with him and say "officer, I wasn't technically nude, since I was wearing one sock". You can see there, how an officer is granted latitude to interpret the anti-nudity statute, right? And trust me, his superiors will side with him. That's why there are broad nebulous catch-all laws that prohibit "annoyances", for example. See how that can be used, to fit a variety of situations, as they come up in the field? There is simply no way to make laws that will be so detailed as to address the millions of things that *could* come up, in daily life, so therefore public officials are granted power to do their jobs.
And as arbitrary as that sounds, you're right: the downside is that it allows a "barney-fife" to just nilly-willy make up stuff, essentially. And you'd have to fight it, which is an exercise in futility, as you can imagine (all he has to say is "he was making a mess", even though it's not true, and you'll be hard-pressed to argue that you weren't, if you even had so much as a simple screwdriver probe).
So my tactic is, to avoid all such busy-bodies. It's gotten to where I just do most of my park-hunting at "off-times" (low traffic, etc...). The less lookie-lous, the better. Because let's face it guys: we're in an odd-hobby, that has admitted "connotations", and you're simply not going to escape that. You're simply not going to be able to waltz over beach blankets at an archie convention, in front the landscaping crew and bored cops.
Oh, and I might add: I notice that you say yourself you've gone for a long time, and never been bothered. I too have had similar situations occur (where perhaps a cop was simply responding to a call that came in, but personally could care less). And ....... to be honest with you, I'll give lip service ('splain that I checked and saw nothing prohibiting it, but that I recognize his job's not easy, so I don't wanna ruffle any feathers). Then I merely give it a few months break, and return at a different shift. And then, ...... it never happens again, and things return to normal. If you're in a "one-cop town", perhaps this isn't an option for you. But in bigger cities, I never let a single one-time gripe indicate to me that "oh no, the parks are off-limits". Because usually it's just an isolated incident, that you can just avoid just that one person, or just that one angle in that one park, in the future.