Program to insert an element into an array