This show of force happens quite a bit around the city and could be a part of the NYPD's Operation Hercules and Operation Atlas.
The NYPD randomly appears with tons of cops and officers in heavy equipment (M16 rifles, riot gear, special operations equipment) at locations around the city as part of an "anti-terrorism" program.
They usually sweep in en-masse and make an appearance, scare the **** out of us ordinary New Yorkers living our day to day lives and pose for pictures with the unassuming and bewildered tourists.
There was a subway shooting last night, yes - but it was downtown.
My educated guess would be that it was part of Operation Hercules, running drills for the upcoming Fourth of July holiday and the requisite elevation of terrorist threat levels.