You could pick any attribute and symbolize it using a Graduated symbol with a four color ramp, or however many colors you want. If you want more control over which colors get used, I would recommend adding a
mapcolor integer field with as many values as colors you want to use. For example, the Natural Earth country data includes
mapcolor13 fields that you can use depending on whether you want to use 7, 8, 9, or 13 unique colors.
But if this is a one-off, you might just do what I first suggested and use a four color ramp for any already existing field. As long as that field does not have a spatial pattern to it, the colors should appear random. The pattern won't be random if, for example, the polylines represent something like street numbers that are numbered sequentially. In that case, all the street numbers that are near each other would be assigned the same color.