What is the efficient way to find all factors of a number?

PS: I am using a prime sieve, storing least prime factor of each no in sieve array and after then dividing each no by prime_factor[number] ( storing it in the map ) and at the same time dividing the number by prime_factor[number] while it is not equal to 1.

I know it is wrong to approach as so many factors are missing.

Please suggest some good approaches.