In reply to juhi_p:
Another bad example that does not do anything. Try the following:
struct { byte red, green, blue; } c [10];
foreach (c[i])
begin c[i].red = $urandom_range(5);
c[i].green = $urandom_range(5);
c[i].blue = $urandom_range(5);
end