Order-to-disorder transition due to entropy in layered and 2D carbides