in reply to making arrays that act like hashes at runtime

You may be able to get what you need by using the enum module. It would let you do this:

use enum qw(first=1 second); my @foo; @foo[first, second] = qw(hello world);
That puts the constants in the package namespace though, which you might not want. It's good for making objects based on array refs. If this isn't what you're after, try ArrayHashMonster.