in reply to How Not to Alter Hash in HoA while Counting Array

Simply making a new reference to a copy of the array may solve your problem:

my $ar = [ @{$hashref->{$key}} ];