find minimum (smallest) element in array