Arrays and objects get automatically serialized/unserialized because they are php data types being stored as strings by MySQL. If you save array with update_post_meta you don’t need to unserialize the returning value get_post_meta, function will do it for you.
Easier to look at update_post_meta function’s source code. It calls update_metadata function where you can see a call of this function:
maybe_serialize( $meta_value );
As you can see, if data is array or an object type – it will serialize this data.
function maybe_serialize( $data ) {
if ( is_array( $data ) || is_object( $data ) ) {
return serialize( $data );
}
From the other side, when you use get_post_meta function, this chain
is bigger, but at the end it calls maybe_unserialize function, which do unserialization if needed.
maybe_unserialize( string $data )
In your case you are trying unserialize unserializable string. serialize() function returns false and generates E_NOTICE if it can’t unserialize a value.