For a project I want to measure emg signals and put them in and array to smooth them later. To do this I want that the array gets updated every time a new signal comes in.
So, when a new data point comes in, the current value of A[0] gets transfered to place A[1] and A[1] goes to A[2] and so on. The last element of the list needs to drop. I think I need to do something with pushing and popping but I don't know exactly what to do.
Can someone help me with a little example code of what I have to do?
It is usually easier and faster to leave the values where they are and set where the next value should be put using an index variable. Increment the index and save values until the end of the array is reached then reset the index to zero.
A good solution would be what's known as a 'circular queue'.
Do a google search for "circular queue array". You will find a number of good explanations and examples.
I suggest that you read through a couple of them, to get your mind around the concept, then modify some of the example code to suit your need.
Something like this need not be specific to the arduino, just keep in mind that memory is limited, so keep your array size down.