Unfortunately you will not be able to play your entire NAS drive library at random.
The UPnP system is based around a play queue so you must first add all the tracks/albums you want to play to the play queue, then from within the play queue, you can select shuffle mode in the StreamMagic app and the order of the tracks in the play queue will be randomly changed.
Please note that most UPnP servers place a limit on the number of tracks that can be added to the play queue. While this varies from server to server, it's typically around 2000 tracks.
This is the process in which UPnP works and the vast majority of UPnP control point apps will work in a similar way.
It's also worth noting that some media servers may offer additional functionality, like the Jukebox function in Asset UPnP, for example.
In theory, this does effectively allow you to randomly play content picked directly from the server. Features like this may, however, require a subscription or payment and may not be supported by all Network Players or control point apps.