Inserting element at particular position in an array