Change object materials

How can I change a gameobject’s materials?

material.enabled = true;

this changes the primary material, but how can other materials be changed?

Renderer.materials is an array of all the materials.