Efficient Dynamic Array Implementation for Matlab