basic select sort to handle small size array