Elon Musk says Tesla plans to sell its Optimus humanoid robot by 2027, with the AI-powered machines already performing factory tasks.