Infer layouts based on type