Here are some examples in which the formula suggests the arrangement:

1. the acetate ion: C2H3O2-, suggests that

- the two Carbons stay together forming the "spine" of the molecule,
- the 3 Hydrogens stay together as well so they are probably attached to one of Carbons
-  the two Oxygens stay together and must be attached to the other Carbon.

the initial placement of bonds will looks like so:

See the full Lewis structure here.

2. hydroxylamine: can be given as NH2OH, and suggests

- NH2 most likely stays together, clearly H is/are not in the center so N has to be,
- notice that OH stays together on the other side of the molecule.

the initial placement of bonds will looks like so:

See the full Lewis structure here.