You don't provide example input and example output so it's hard to know what you want and what the limitations are. Also, I'd strongly suspect this isn't the right way to go about it, but I don't have a better suggestion at the moment. Is this anything like what you had in mind?
Code:
:cat file3
foo.*bar
baz.*mu
:cat file4
nerf
poit
:cat jettascript
#!/bin/sh
array1=( $(cat file3) )
array2=( $(cat file4) )
for (( i=0;i<${#array1[*]};i++ )); do
sed -n "/${array1[$i]}/s/\.\*/${array2[$i]}/p" file3
done
:./jettascript
foonerfbar
bazpoitmu
This isn't at all robust (the input data here doesn't need to be quoted and file1 and file2 are the same length and so on) but might give you something you can work with.