The gun layout was first introduced to US DDs in the Mahan class of 1934 - the same year as the first German DDs were designed. In the US ships, the torpedo tube layout went through a few config changes over the next few classes, but ended up with 2 centerline mounts on the modified Sims class, and continued that with the Benson/Gleaves and Fletcher classes. So either nation copying the design of the other is unlikely. The positioning of the 2 forward gun mounts and the 2 after gun mounts is fairly intuitive. After that, it is a matter of placing the 5th gun and the tubes. Placing that last gun at the forward end of the after deckhouse keeps the magazine spaces close together and simplifies the machinery arrangements. That several nations came up with the same basic layout simultaneously is hardly surprising.