A non-parametric model for linking galaxy luminosity with halo/subhalo mass: are brightest cluster galaxies special?