Depending on the engine you can do what you describe. Sometimes the sidewalk is just part of a bigger road mesh which has the whole road from side to side. You can use decals for the stripe. Or just have it as part of the texture. Or just make a polygon that's yellow for the stripe.
lately i've been reading up on modularity and i have some unanswered questions regarding the technical side aka how its done the right way lets say we have a building and want a sidewalk all the way around it. how would this be made in the engine ? would you just make two pieces. a straight one and a corner and slap them…