Effects of radial envelope modulations on the collisionless trapped-electron mode in tokamak plasmas