title: Replace string characters from array
body: <p>I have a string (of undertermined length) that I want to copy a lot of times replacing one character at a time from an array (of undertermined length) of characters.</p>
  
  <p>So say I have this string: 'aa'<br>
  And this array: ['a', 'b', 'c', 'd']  </p>
  
  <p>after some magic for-looping stuff there would be an array like: ['aa', 'ab', 'ac', 'ad', 'ba', 'bb' ... 'dc', 'dd']  </p>
  
  <p>How would you do this? I tried something using three for loops but I just can't seem to get it.</p>
  
  <p><b>Edit</b><br>
  The dependency on the string is the following:</p>
  
  <p>Say the string is: 'ba'<br>
  then the output should be: ['ba', 'bb', 'bc', 'bd', 'ca' ... 'dd']</p>