Yes, they can be transferred to another state, "sort of". If you use Vonage or a similar VOIP service, you can transfer any number from anywhere in the US. The problem starts when you want people to call you. If you live in Texas and buy a New York number, someone who lives across the street and wants to call you has to call New York so there are long distance charges involved.
Most VOIP services offer unlimited LD service, so it's not a problem for you, just for "normal" phone users who would want to call you. This can be used as a feature, though. If all of your friends live in NY, then get yourself a NY number. Their calls to you will be local no matter where you actually live.