Find the closest number in an array