An armed man was shot and killed by a retired NYPD lieutenant in East Harlem following a robbery at a nearby pharmacy.