// Your array should be declared outside of the loop
string[] x = new string[] { "", "", "" };
Random random = new Random();
// Also you should NEVER have an endless loop ;)
while (true)
{
Console.ForegroundColor = Color.FromArgb(random.Next(255), random.Next(255), random.Next(255));
Console.WriteLine((x[random.Next(x.Length)]));
Thread.Sleep(100);
}
Run Code Online (Sandbox Code Playgroud)