It depends on the creature.
As you quoted, the Simulacrum spell states:
You shape an illusory duplicate of one beast or humanoid that is within range for the entire casting time of the spell.
Simulacrum goes on to say:
It appears to be the same as the original, but it has half the creature's hit point maximum and is formed without any equipment. Otherwise, the illusion uses all the statistics of the creature it duplicates, except that it is a construct.
Non-Humanoids
Both Imps and Doppelgangers have the following line in their Shapechanger ability:
Its statistics are the same in each form, except for the speed changes noted.
Creature type is part of their statistics; even if they look like a humanoid or beast, their creature type hasn't changed making them invalid targets for simulacrum. The spell would simply fail, which is telling in and of itself.
The vampire's bat form has a similar line. The mist form is clearly neither beast nor humanoid.
Changelings & Lycanthropes
Changelings and Lycanthropes are humanoids, a valid target, and would be duplicated. We have to look to the features that grant them alternative forms to see how they interact.
Change Appearance. The changeling can use its action to polymorph into a Medium humanoid it has seen, or back into its true form. Its statistics, other than its size, are the same in each form.
Each Lycanthrope's shapechanger property has slightly different wording, because some of them change size or AC, but they all indicate something to the effect of.
Shapechanger. [...] Its statistics, other than its size and AC, are the same in each form.
The statistics don't change when it uses change appearance, so the simulacrum would still be a changeling or lycanthrope.
Druid Wildshape
It wasn't part of the initial question, but it's worth noting that the Druid class' wildshape ability is worded differently. A druid's statistics are replaced, so it's type actually does change - it really is a beast.
Your game statistics are replaced by the statistics of the beast, but you retain your alignment, personality, and Intelligence, Wisdom, and Charisma scores.
Polymorph & True Polymorph
Polymorph is a non-issue, because it only lasts an hour and simulacrum takes twelve hours to cast.
True Polymorph is a thornier matter.
If you concentrate on this spell for the full duration, the spell lasts until it is dispelled.
The target's form is maintained by magic, so what is simulacrum duplicating? By strictest RAW, it duplicates the creature as it currently exists. The permanent-but-dispellable true polymorph wasn't cast on the duplicate, so the duplicate takes the previous form as soon as the simulacrum casting completes. I'm not sure how satisfying a solution that is, so a DM may want to rule differently, but it seems the most in-line with what's actually in print.