You can create them as in your question which will create a temporary on the stack and then copy it across to your instance (which may be a little wasteful), or you can use static variables and an initialisation list in which any compiler worth its salt will just initialise the appropriate members of the class:
class temp
{
public:
temp():b(b_default) {}
array<int, 5> b;
static array<int, 5> b_default;
};
array<int, 5> temp::b_default = {1,2,3,4,5};
This way is probably the 'cleanest' way however: (again, a single copy for all decent compilers)
class temp
{
public:
temp()
{
static const array<int, 5> b_default = {1,2,3,4,5};
b = b_default;
}
array<int, 5> b;
static const array<int, 5> b_default;
};