Thanks, this is exactly what I was missing! 
For anyone interested, here’s a complete example:
x = np.array([-1,0,1])
with pm.Model() as m:
tmp = pm.Categorical('tmp',[0.25,0.5,0.25])
X = pm.Deterministic('X',theano.shared(x)[tmp])
trace = pm.sample()