Torrential rainfall has caused flash flooding in parts of New York City.