$template = preg_replace($patterns, $replace, $template);
would take $templace, find matches for $patterns, and replace them with the contents of the corresponding entries in $replace. Then put the altered string back into $template.
To change this, use the e pattern modifier, and write assignment operations for your 'replace' text.
$patterns = array(
"/Name: ([a-zA-Z]+)/se"
);
$replace = array(
'$text["name"]=\'\1\'',
);
$template = preg_replace ($patterns, $replace, "Name: Archibald987");
print_r($text);
echo $template;
returns
Array
(
[name] => Archibald
)
...and because the value of $text["name']='Archibald' is the string 'Archibald', this is what the matched text (i.e., 'Name: Archibald') in $template is replaced with, so that becomes 'Archibald987'.
Watch those quotes in the $replace array. I used single quotes so that $place_array would be read as the string '$place_array' and not treated as a reference to the variable $place_array, and the matched text (referred to as \1) is itself quoted with single quotes to make it a string (which, since they appear inside a single-quoted string, have to be escaped).