It's (supposedly) possible to commute.... I used to do so to Philly (much shorter) but don't expect it to be feasible to commute to AZ for a year or 2... Expect mainly 5on 2off schedules for at least that long....
The Cape, though pricey, is an awesome place to live... Expect to pay approximately 1000-1500 a month for a nice 2 bedroom apt year round.... Condos and houses start at about $210,000.... BUT if you can afford it, a GREAT investment on the cape... Resale quickly!....
Other places that are more moderately priced and driveable exist, and there are people who drive daily to and from the boston area... In the summer you MAY even be able to hold a
Boston Base, though it's not likely in your first year.... Some closer places that are a tad more affordable and are nice: Plymouth/Kingston, New Bedford, Taunton, Wareham, etc...
Great place to work.... As I always say, best time of my life....
Good Luck