If, for example, you're aiming for a 31/x/31/31/31/31, use the appropriate dittos from Safari to create parents with 31/x/31/x/31/x and x/x/x/31/31/31 or something like that. Basically have two parents that have the perfect IVs between them. Set them to work, and eventually you will start getting offspring that are superior to one of the parents, eg. a 31/x/31/x/31/31. In that case, replace the old parent with the offspring. Make sure you keep track of the parents, to ensure you still have all the relevant stats covered. Eventually you will have two parents with spreads like 31/x/31/31/x/31 and x/x/31/31/31/31, at which point getting your 31/x/31/31/31/31 will be a trivial matter of waiting.
This becomes troublesome with genderless Pokemon, as one of your parents will always be a Ditto with only two perfect IVs (unless you've been lucky enough to find a Ditto with more than two). It's still feasible, it will just take a LOT more time.