rng shuffle;

arrayLen = randi( 9 ) + 1;
array = randperm( 90 , arrayLen ) + 9;
[ asc , desc ] = myIndexing( array );
disp( array );
disp( array( asc ) );
disp( array( desc ) );