From a programming point of view, what you are looking for is the ability to index the observations of a variable. Using the data step, this would mostly need to be done by creating an array. However, the TIMEDATA procedure will automatically allow that kind of access to a variable as a series. Consider this code which shows computing a 5 term moving average using an array and using PROC TIMEDATA. (see below)

Actually from within the TIMEDATA procedure, you can even skip using FCMP, and access the observations directly. Here is an example from the documentation:

proc timedata data=transactions
out=timeseries
outarray=arrays;
by customer;
id date interval=day accumulate=total;
var withdrawals deposits;
outarrays balance;
balance[1] = deposits[1] - withdrawals[1];
do t = 2 to _LENGTH_;
balance[t] = balance[t-1] + (deposits[t] - withdrawals[t]);
end;
run;

Here is the example contrasting the data step with TIMEDATA when using an FCMP subroutine:

proc fcmp outlib=work.timefnc.funcs;

subroutine movingAverage5term( series[*], ma[*]);
outargs ma;
actlen = DIM(series);
do t = 1 to actlen;
if ( t < 3 ) then ma[t] = .;
else if ( t > (actlen - 2) ) then ma[t] = .;
else ma[t] = (series[t-2] + series[t-1] + series[t] +
series[t+1] + series[t+2])/5;
end;
endsub;

run;
quit;

options cmplib = work.timefnc;

proc transpose data=sashelp.air out=airtrans prefix=air;
var air;
run;
proc print data=airtrans;
run;

data smooth_air;
set airtrans;
array air{144} air1-air144;
array maair{144};
call movingAverage5term(air,maair);
run;

proc transpose data=smooth_air out=airma prefix=MA;
id _name_;
var maair1-maair144;
run;
proc print data=airma;run;

proc print data=airma; run;

proc timedata data=sashelp.air outarray=airMA2
print=(arrays);
id date interval=month;
vars air;
outarrays maair;

call movingAverage5term( air, maair );
run;
proc print data=airMA2;
run;