Inserting multiple elements in an array which skip existing numbers