Because the federal government is not doing a good enough job securing the Arizona border, the result has been a rise in crime along the boder and elsewhere in Arizona. Phoenix is now the kidnapping capital of the U.S. Since border policing is a federal job, Arizona has chosen to enforce immigration law by checking the residency status of people who law enforcement officers have already stopped and who they have reason to suspect may not be here legally.
Alternatively, could Arizona use the power of eminent domain to take over a patch of land parallel to the border, declare it a state park, and fence the entire thing? Then they could enforce trespassing laws there if anyone breaks through the fence.
They'd likely have to get permission from the Tohono O'odham Nation since they have a vast amount of that border under their jurisdiction. But I suspect they might grant such a waiver as the illegal immigrant issue is causing quite a bit of disruption and crime in their land as well.