Please help me i just want to ask

i just want to ask if this is possible

i have a membrain keypad and i want to store all the pressed key in one array like in other programming languages array push or array pop

I just need a simple circuit layout for connecting my Electromagnetic lock to arduino with LCD and keypad

Thanks

Yes it is possible.

You would need a char array at least as big as the maximum number of key presses you want to store.
You would maintain two indices or pointers to the array.
One would point to the first used location in the array and one would point to the last used location in the array.
You would write functions to 'push' characters into the array or 'pop' them off.
You also need to know when the array is empty or full and it is handy to have a 'peek' function that tells you what the next character to be popped will be without actually popping it.
You can make the array behave as First In First Out (FIFO) or Last In First Out (LIFO) depending on how you manipulate the pointers.

The main issue here is that push and pop assume an array of variable length, which in turn means dynamic allocation.

While C supports dynamic allocation (malloc and free), it is considered something you should avoid whenever possible on arduino, because there's so little memory - problems like memory fragmentation are very easy to cause. This is why on the forums we always tell people not to use String (the String class, with capitol S, relies on dynamic allocation), and use c strings (fixed length null terminated character arrays) instead.

You can simulate it with a fixed length array (up until you reach that length), but you have to write the code to keep track of where the "end" of the array is.

Most probably you want a FIFO storage (First In First Out). That's different from a stack (LIFO) associated with push and pull requests.

A FIFO can be implemented with dynamic or static (circular buffer) char arrays, with two pointers or indices referring to the head and tail of the stored character sequence.