How do you perform a binary search in a given array?