Despite being an urban jungle, New York is a pet-friendly city. You'll see people walking dogs of all sizes (and carrying a few of the smaller ones in purses) every time you go outside.
There are several species of animal you are not permitted to have as a pet. Generally anything considered a farm animal (that includes those cute teacup pigs) or an exotic animal (goodbye hedgehog) are illegal. So if you have anything besides fish, a cat, or a dog it's a good idea to look up whether it's allowed. New York does not have any breed-specific legislation for dogs so all pooches are welcome.
Also, note that if you are renting it will be difficult to find a place that actually allows dogs or cats and you can expect to pay more for the ones that do.
Helpful Pet Resources
Pet Restrictions: What to know before you relocate your pet overseas.
?What you need to know on relocating your pet abroad.
Chewy - Comprehensive online store for all your pet needs at competitive prices.
Wild One - High-quality leashes, collars, and carriers with thoughtful design.
PetCareRx - Prescriptions and medications for your pet.
PetPlan - Pet insurance at competitive prices. Not something to be forgotten, especially here in The United States.