std::declval is a compile-time utility used to construct an expression for the purpose of determining its type. It is defined like this:
template< class T
Arrays cannot be returned by value thus even just the declaration of a function returning an array by value is invalid code.
You can however return an array by reference.