in reply to shifting the middle of an array?

Look at splice. It can do pop, push, shift, unshift, and more.