Can I set object viewport colour from cycles nodes?
Sadly you cannot set more than a single color per Material on an object in cycles, it is possible to get multiple colors as you showed in the LookDev (2.8) view mode.

the reason you do not see the random color array is because in cycles the random, just like the pointiness is only claculated in the render.