Looks like this question has been asked before.
https://communities.sas.com/t5/SAS-Programming/Passing-list-of-arguments-to-Finance-XIRR-function/td-p/92812
Looking at that question you should probably just set the extra amounts to zero and the extra dates to match the last date.
array amt (50) ;
array dt (50);
do i=loan_term +1 to dim(amt);
amt(i)=0;
dt(i)=dt(loan_term);
end;
result = finance('xirr',of amt(*), of dt(*));
... View more