How to find the closest object in an array of gameObjects?

Basically I have an array of GameObjects, and I need to find the closest object in the array to a certain point. Is there a way to do that?

run through your array with a for loop, testing each against a target object

c#

float distance = Vector3.Distance (object1.transform.position, object2.transform.position);