Insertion Sort algorithm using an array