Move array manipulations to the I/O base package