Saving values using variable_set through an array
It's the same:

The variable_set function saves the variable to database serializing it. variable_get takes the variable from $conf where the variable is already unserialized. 

Example:

$var1 = array(
 'key1' =&gt; 'value1',
 'key2' =&gt; 'value2'
);
variable_set('var1', $var1);
print_r variable_get('var1');


Output

Array
(
    [key1] =&gt; value1
    [key2] =&gt; value2
)