One option in New York, Brooklyn, & Bronx would be to build more elevated walkways and bikeways which would naturally have restricted access points.
Unfortunately the current elevated pathway is apparently restricted from bicycle use
However, there is no reason the city couldn't start investing in purpose built elevated bikeways and walkways.
Of course, making areas with limited egress, one may eliminate one type of potential attack, and open it up for something entirely different. However, with good planning, perhaps one could make the paths safer for everyday cycling, and thus reduce injuries and deaths.