This PR adds a generic set type to get rid of maps used as sets. Co-authored-by: wxiaoguang <[email protected]>