Welcome to owning the E70, i have the same year and specs and color as yours.
The loud thud or metal noise is the transfer case engaging - I have the same issue with mine. Our infamous BMW dealer here in the Boston area informed me that my transfer case is going and I should change it - if you are under the warranty or CPO, etc. you maybe lucky for a free replacement - I am on the otherhand am out of the warranty and no extended so its about 4 grand. Im' gunne drive till it dies

My indy told me its probably small fix as in the actuator is dying that engages the transfer case gears.
By the way how many miles do you have on your X? My noise is not always, every few days I hear it.