title: Add string in array
body: <p>I'm building a menu items which the data are fetched from the database. I would like to add a class to all items even if the class from the array does not exist yet. However, when a class element does exist on the database, the initial class was getting overwritten.</p>
  
  <p>What is the best practice to add class from the beginning? here's a sample code:-</p>
  
  <pre><code>$menu = [
    'title' =&gt; $title,
    'url' =&gt; $url,
    'attributes' =&gt; [
      'class' =&gt; 'link-item'
    ]
  ];
  
  // assuming that the $data['attributes'] is the data fetched from the database
  // assuming that the $data['attributes'] structure are as follows:-
  // $data['attributes']['title'] = 'hello';
  // the initial class set should be added to $data['attributes']['class']
  // $data['attributes']['class'] should be 'link-item icon-something'
  // $data['attributes']['class'] = 'icon-something';
  // $data['attributes']['target'] = '_blank';
  if (isset($data['attributes'])) {
    $menu['attributes'] = $data['attributes'];
  }
  </code></pre>
  
  <p>Please note that there's an admin ui to set more menu attributes.</p>