[Platform] Factorize platform loading using StateT