Understand that CL is ill-suited for this. Following is untested:
DCL &ARRAY *CHAR 50
DCL &PTR *PTR ADDRESS(&ARRAY)
DCL &ELEM *CHAR 10 STG(*BASED) BASPTR(&PTR)
DCL &i *DEC (9 0)
...
/* Loop through the array */
DOFOR VAR(&i) FROM(1) TO(5) BY(1)
CHGVAR %OFFSET(&PTR) (%OFFSET(&PTR) + 10)
/* &ELEM is the current array element */
ENDDO
Post some code; what did you try? If you can't post any code, post pseudo-code and explain what you want the code to do.
EDIT: The above code snippet implements an array. This is quite similar to a stack. LIFO is as easy as keeping track of the latest array index. In the above snippet, the CHGVAR adds 10 bytes to the pointer. It is 10 bytes because each array element / stack element is 10 bytes (DCL &ELEM). This particular stack holds 5 entries - 5 times 10 = 50 (DCL &ARRAY). Adding 10 bytes is PUSH, subtracting 10 bytes is POP. The current &PTR is the most recent stack entry.
Your next step should be to write one subroutine for each of the major operations in your outline. Start with PUSH. If you aren't familiar with the debuggers on IBM i, use DMPCLPGM to see the results of your code in operation. Try it, then if you still have questions, post your code and ask a specific question about that code. Programming is about writing code, so jump in and try! :-)