if (std::find(std::begin(ourArray), std::end(ourArray), 99) != std::end(ourArray))
{
// Do stuff
}
#include <algorithm>
std::array<int, 3> arr = {1,2,3} // your array here
if (std::find(std::begin(arr), std::end(arr), 3) != std::end(arr)) {
// code here
}