Implement array splice.