Implement insertion at a specific index.