Did you tried to compile those code snippets?
The first one will surely fail. You are referencing a built-in type (int) as if it's an object, which is not.
The second one has similar problem (calling a built-in type as an object), though you might be able to get away by calling std::empty(myarray). Please note that the lines where you define a pointer to int and then assign mypointer=myarray are useless: as an array name is a pointer to the first element, you are simply creating a copy of it that you aren't going to modify. So it's wasted memory. Also it is advisable to use nullptr or at least the macro NULL when dealing with null pointers, as they are easier to spot in a lot of code and less prone to casual modifications. Last but not least, the if check isn't going to fail ever, since the pointer will always contain an address. Back to possible solutions, I still think std::empty() it's going to fail during compilation since, skimming through his documentation, it doesn't seem to be able to take an array as an argument, which makes sense, since array are never ever empty, they can at most contain uninitialized values.
The third snippet will compile and work as intended, thanks to how vectors are builded.
I don't know if it's possible, but you may want to look into the array object documentation if you have fixed data size and want to avoid the (small) overhead of vector.