Together, these developments are helping to stratify the metropolitan region. Scattered pockets swell with immigrants in unprecedented numbers. But areas that include hot housing markets and gentrifying neighborhoods inside and outside New York City have declined in foreign-born populations, the new numbers show.