These are the fruits of the Osage tree. Native to North America, and most common in the south central plains of US—the Red River valley especially, but with cultivation, they are found all many places—including NYC –which is the northern most extent of their range.
You can find them ‘growing wild’ in Central park—(as if anything but weeds grow wild and the jury is still out on the weeds!) There is a magnificent specimen at the entrance to the park just south of the 96th Street transverse—on Central Park West (for 1!)
They are not poisonous, but most people find them so foul tasting they retch if they try to eat them--but the web site (link below) says the seeds are edible.
You can find more info about them here--or at wikipedia, and various other places
NYC parks, both public and private, are home to a wide variety of trees—some magnificent, some rare, some huge—and some, like the Osage, just interesting!