in reply to The behavior of array and hash OPs

the scalar itself is really being stored to the container, or fetched from the container, instead of its copy

Its got two parts.

$array[0] = $i;
is really something like
$array[0] = sv_mortalcopy($i);
There is no av_store_copy, there is av_store and sv_mortalcopy.

Seems somebody already thought about this some

https://github.com/Leont/libperl--/blob/master/perl++/headers/array.h

https://github.com/Leont/libperl--/blob/master/perl++/doc/Array.pod