This is inspired by and is a branching off of the question "Move into nonhostile space attack and move"
The section on "Moving Around Other Creatures" states:
[...] Whether a creature is a friend or an enemy, you can't willingly end your move in its space [...]
The is also the following unofficial ruling (tweet) from lead game designer Jeremy Crawford:
Q. Can a character move into a space occupied by their ally, make an attack from that space, and then move away?
A. You can't willingly stop moving in another creature's space.
Both the question mentioned at the beginning and the Crawford quote explain that you cannot move into an occupied space, make an attack, and move away; however, perhaps there are other things you could do instead? Basically, what counts as "ending your move"?
Can you do any of the following after moving into an occupied space but before leaving it?
- Take any sort of action
- Take any sort of bonus action
- Take any sort of reaction
- Do something that requires no action whatsoever, such as talking, or dropping concentration
To limit this question a bit, I would like answers to assume that the movement into the occupied space is willing movement.