Arizona Gov. Doug Ducey signed legislation Thursday that directs $335 million in state cash to construct virtual or physical fencing along the border with Mexico, part of a $564 million border security funding package that is the most ever spent by the state.