It is very simple. All you have to do is perform the extraction as a condition:
while (i < MAX_SIZE && std::cin >> x[i++])
if the extraction fails for some reason (more characters remain, incorrect input, etc.), the cycle will end and the failure will be presented in the input stream.
, C-. std::array<T, N> ( std::vector<T>, ).
, std::vector. , :
std::vector<int> v{ std::istream_iterator<int>{std::cin},
std::istream_iterator<int>{}};