Array.remove function