Here's what I use. I expanded my types so you can see the raw array.
func read(this:var array[SIZE, byte], T:typedesc, pos:Natural = 0):ptr T =
result = cast[ptr T](addr this[pos])
What about:
import std/sysrand
proc urand[T]():T =
assert urandom(cast[var array[sizeof(T),byte]](result.addr)
for value types only