Probably the simplest way is to sort your array of numbers and then pick out the first two.

Two simple algorithms:

Insertion sort
Selection sort