How to Inject file/page in files/pages at specific position

I have this situation I have a files collection and I want to inject a file at a specific position set by the user in the panel.

The use case is a slideshow with images and videos picked from project pages via the files picker and another field to add a special holiday info slide into the set. What I came up with is this:

$media = $page->slideshow()->toFiles();
if($eventMedia = $page->event_media()->toFile()){
	array_splice($media->data, $page->event_media_position()->int() - 1, 0, [$eventMedia]);
}

I didn’t find a built in collection method for this and I was wondering if there is one.

The only alternative I could come up with using Kirby’s collection methods would be

$media = $page->slideshow()->toFiles();
$eventMedia = $page->event_media()->toFile();
$position = 2;
$media = $media->slice(0, $position - 1)->add($eventMedia)->add($media);

You can add the complete $media collection at the end because elements will not be added to the collection if their key already exists.