title: Spark scala get an array of type string from multiple columns
body: <p>I am using spark with scala. </p>
  
  <p>Imagine the input:</p>
  
  <p><a href="https://i.stack.imgur.com/AdEOO.png" rel="nofollow"><img src="https://i.stack.imgur.com/AdEOO.png" alt="enter image description here"></a></p>
  
  <p>I would like to know how to get the following output [see the column accumulator on the following image] which should be a <strong>Array of type String Array[String]</strong></p>
  
  <p><a href="https://i.stack.imgur.com/TFLyp.png" rel="nofollow"><img src="https://i.stack.imgur.com/TFLyp.png" alt="enter image description here"></a></p>
  
  <p>In my real dataframe I have more than 3 columns. I have several thousand of column. </p>
  
  <p>How can I proceed in order to get my desired output?</p>