These are all completely different situations.
A goal kick can only be taken within the goal area (the 6 yard box). (Law 16)
A drop kick means the ball is still in play. The goalie could as well throw the ball to a team mate.
Free kicks can be awarded anywhere inside or outside the box (except for the opposing box). They're taken from where the previous ...
The free kick awarded for a offence anywhere on the field is taken from the place where the foul occurred. It doesn't matter how close to the corner that is.
There are some exceptions,
a direct free kick to the attack inside the penalty area is a penalty kick
an indirect free kick to the attack inside the goal area is taken on the long edge of the goal ...
This is covered in Law 5 "The Referee", Section 3 "Powers and Duties":
[The referee] allows play to continue when an offence occurs and the non-offending team will benefit from the advantage, and penalises the offence if the anticipated advantage does not ensue at that time or within a few seconds
i.e. either the offence has to be ...
A goal like that can indeed be disallowed for playing in a dangerous manner.
According to Law 12:
Playing in a dangerous manner
Playing in a dangerous manner is any action that, while trying to play
the ball, threatens injury to someone (including the player themself)
and includes preventing a nearby opponent from playing the ball for
fear of injury.
I believe this is at least mostly answerable from the rulebook, particularly post-Harden rule. Two clarifications that don't actually answer (but make things more clear, I hope, by eliminating some murkiness), then the answer.
First: adding the definition of "the gather" into the rulebook made this a bit more clear, I believe, but didn't change ...