Added an insert function for array.
Added a sample for array.