Initialization and assignment are two different operations, despite similarity in the syntax.
int x[4] = { 1, 2, 3, 4}; // initialization
x = { 1, 2, 3, 4}; // assignment
Additionally, raw arrays in C and C++ behave strangely and in particular there's a special rule that says that they are not assignable:
int x[4];
int y[4];
y = x; // error, arrays are not assignable
So even if you create an array temporary object you cannot simply copy that into another array object using the assignment operator.
Instead, if you are set on using raw arrays, you have to set each array element individually, using memcpy, fill, etc.
A better solution is to use C++ and a type other than raw arrays which does allow assignment, such as std::array<unsigned char, 64>:
std::array<unsigned char, 64> buffer = {0xef,0xaa,0x03,0x05,0x05,0x06,0x07,0x08};
buffer = {}; // zeros out the array
The std::array template just generally behaves consistently like a normal object whereas raw arrays in C and C++ have all these very strange behaviors and special cases in the language specs. You should avoid using raw arrays.
Unfortunately C does not have any alternative to raw arrays.
'0' != 0x00.strtol,lexical_castorstringstreamcan help).