Clean and dirty does not depend on locked bootloader of TWRP.
if you switch ROM, (e.g. from MIUI global to Xiaomi.eu, or MIUI global stable to developer ROM) do a clean install, which means wipe cache, dalvik, data
if you upgrade (e.g. updating Xiaomi.eu from an older version to a new version)...