If I’m understanding right and you’d like a layer to randomly appear and stay visible, you could apply this expression to its Opacity property. I’ve tried to make the code as approachable as possible, but I’m happy to answer any questions:
// set the earliest and latest possible appearance times, in seconds
var minTime = 0;
var maxTime = 5;
// use the layer index to seed the random number generator,
// and make the result timeless (so the random numbers that
// are generated are consistent from frame to frame
seedRandom(index, true);
// randomly choose a time for this layer to appear,
// from the minimum time to the maximum time specified
// above. We'll use "gaussRandom()" instead of "random()"
// for a more pleasing distribution of random values
var appearTime = gaussRandom(minTime, maxTime);
// this layer should start with 0% opacity (invisible)
var visibility = 0;
// if the current time is greater than the appearance time,
// set visibility to 100%
if (time > appearTime) {
visibility = 100;
}
// return our "visibility" variable
visibility