raw() would be same kind of lazily evaluated wrapper for raw that is done for ref() so that one doesn't have to dig it from knex instance.
lit() would be used to be able to give for example javascript array to different array format {1,2,3} vs. (1,2,3) etc. and to be able to cast literal explicitly like ref() allows for field expressions.