It depends - what type of fingerstyle? There are a number of different styles.
Do you mean classical technique to play classical repertoire? If so, the PIMA designations of P for the lowest 3 strings are loose guidelines at best and entirely depend on the note sequence being played. If I am playing a full chord from 6th to 1st string, I might use, PPPIMA, but if there is a scalar run from low E going up to D string, then I won't restrict myself to only the thumb (you can do this, but harder to get up to speed) - I would use an alternating IM sequence. Some guitarists use IM, MI, IA whatever, even IMA for 3 note per string runs. Generally speaking, classical technique advises against playing two consecutive notes with the same finger for runs (the thumb is an exception - you can play any number of notes with the thumb where it makes sense and where designated the down-stemmed notes) but this differs for chordal playing. It's a big subject - if you want to learn this, you need a teacher and/or discipline.
For other types, there are fewer rules. Mark Knopfler plays fingerstyle and only uses his thumb, index and middle. Jeff Beck only uses fingers - as does Joe Pass - and his technique is almost an 'anti-technique' - he uses whatever finger is most convenient.
For folk styles this is more akin to classical technique - thumb keeps a bassine going and fingers are generally responsible for melody and chording.