Adding array utility functions.
Added stable array sorting for Task #2.