Fix cuda one tuple

Fixes shape being 1-tuple of int for `cuda.local.array` and `cuda.shared.array`.
Also improve error message
Something more specific than Exception perhaps?