in reply to high array values

In theory it should be possible to create a tied array as a front end which does access data outsourced to files or a DB or a cloud service.

I'm confident you could find something like that on CPAN.

The "best solution" depends on the concrete use case...

edit

I suppose we are talking about very sparsely populated arrays, cause one byte per element would result in at least 1e6 terabytes of memory consumption...

Are you sure, you are not rather looking for hashes? =)

Cheers Rolf

( addicted to the Perl Programming Language)