Buildings are being converted to have apartments but it's complex and expensive, and city building restrictions often get in the way.
Exclusive: 46 NYC office buildings could convert to apartments under city's new plan
https://www.axios.com/2024/01/16/office-conversions-nyc-apartments
It's possible. But you'll have to put in a lot of bathrooms. Previously, you can have one bathroom for the entire floor. Now you're going to have to put in one for each room.
It might be cheaper to tear down the whole thing.