insert element in array