Electronic, optical, and thermoelectric properties of perovskite variants A2BX6: Insight and design via first‐principles calculations