[verb (dictionary form)] + ように [verb (potential)] + ように [verb ない-form] + ように
ように means "so that": the first clause is the result you are aiming for, the second is what you do to bring it about. It follows the dictionary form or the ない-form, and the verb in front is one nobody does on purpose – a potential verb, an intransitive verb, a negative.
The two clauses can also have different subjects with ように: the child eats, I cut.
These go beyond "so that".
With する, ように is making a point of doing something; with なる, it is a change that has come about. Both are separate grammar points.
ように after the polite ます, ending the sentence, is a wish or a prayer.