Implementation of array_splice function. Test task for new job.