To do this safely you use the water from your tank and the pump from your tank.
It is best if you do not feed your fish from the day before you plan to do this,do not feed your fish until two days after you have replaced everything you want in your tank.
You might want to lower the temparature 1-2C in your holding tank this will buy you some extra time to finish the job in the main tank.
You can keep the fish in the holding tank for max 48hrs and remember no food during this time,let your pump run continously for the duration of the time your fish is in the holding tank,the reason i say 48 hrs max is the fish will be stressed when they have to live close to each other in a small space.
do not clean the pump/filter at all until at least a week after you have finished everything in your main tank,you will need all the good bacteria you have to avoid amonia and nitrite and feed very little the two first weeks after this job.
If you are replacing the pump/filter in your main tank you need to use both pump/filters for a week to be sure the biological cyclus keeps going in your tank,if it is impossible to run two filters you need to take out the filter media from the old filter and put this into your tank to seed it with bacteria.