Render Array Javascript with Variables
Ok I've managed to solve it myself. 

For anyone that is interested my Render Array now looks like this.

    return array(
        '#slides' =&gt; $slides,
        '#theme' =&gt; 'slider_block',
        '#attached' =&gt; array(
            'js' =&gt; array(
                array('data' =&gt; array('word' =&gt; 'world'), 'type' =&gt; 'setting'),
                drupal_get_path('module', 'single_slider') . '/js/tes.js'
            ),
        )
    );


And my Javascript file (test.js) now looks like this.

(function($)
{
    //console.log(Drupal.settings.word) //This won't work and will return with undefined.
    $(function()
    {
        alert('Hello ' + Drupal.settings.word);
    });
}(jQuery));