I was in exactly the same situation.
I live in NYC (where everything requires a permit. Shotgun, rifle, muzzleloader, you name it, there's a permit needed. An expensive pain-in-the-ass to get permit.) However we have a home in PA so I figured I could go to PA and buy some guns there (long guns only of course since handguns can't be purchased directly from another state) as long as I do not take them back to NYC it is all perfectly legal. So I purchased a shotgun and keep it in PA for busting clays when we go up there once in a while.
Two things to consider:
1) While it's legal. Many places will not be willing to put their FFL license at risk over your line of "But I promise not to take it to NY" which could very well be BS as far as they know. Big chain stores like WalMart, Cabellas, Bass Pro, etc. will generally want nothing to do with you. Try the smaller mom and pop shops. Some will refuse you as well but it's your best bet. That's where I got mine.
2) You can really only get non-evil guns like this. No AR-15 since those are illegal to buy in NYS and by Fed law, the gun must be legal in your home state as well as the state where you buy for the deal to be legit.
In short, yes it can be done. But not with assault weapons and make sure you have a good list of local small gun shops to visit till you find one that's willing to work with you.