Optimization and generating terrains

If I were to generate a terrain at runtime using a random terrain generator using 1 meter cubes (similar to Minecraft), would it be possible to optimize it enough to render without freezing the computer?

What if I wanted to be able to access each individual cube?

You could use a 3D array (in C# T[,,] (where T is type)) to store the block values. To the best of my knowledge, this is how Minecraft does it. As for optimization, that is tricker. As far as I am aware, Minecraft does it by figuring out which faces are exposed to water, air, glass, or something transparent. I think this is done in the loading screens, and was the cause of the weirdness when sand fell on you. Because of this, Unity might not be your best choice. Using OpenGL (see the OpenTK project) directly might be your best choice, since Unity does not like drawing faces on the framebuffer directly.

Use the Mesh class to construct the terrain. See this topic about Minecraft-like terrains.