I'm a bit confused by your code snippet. For example, your input, signal, is never used in the function, so I'm not sure what you intended to do with this code. This being said, you don't have to use extrinsic for phased.URA as it supports codegen. I would just do
function y = SIGNAL_STEER
persistent ss stv;
ss=phased.URA('Size',[20 20],'ElementSpacing' , lambda/2);
stv = phased.SteeringVector('SensorArray',ss,'PropagationSpeed',v);
y = conj(step(stv,fc,1:1:az));
BTW I still cannot reproduce the out of memory issue.