Then, in some way (forums, ml, etc), another entity discovers that A is developing such a feature. Is A obliged in some way to distribute that feature?
No, if someone privately modifies GPL-licensed software, the terms of the license do not require them to share their changes. The GPL requires that whenever you do choose to distribute your software (which may or may not ever happen), that distribution must happen under the terms of the GPL.
What if A decides to share that contribution (in a partial or complete state) to just only another entity (call them entity B) before going public? Entity B can be asked to sign an NDA to avoid B to disclose the feature earlier than A's wishes?
When entity A gives the modified work to entity B, it must do under the terms of the GPL (except for a few narrowly-defined cases in the GPLv3: distribution to a developer solely for modification, or to a facility for code execution). Adding non-disclosure requirements to the terms of the distribution is a violation of entity A's GPL obligations.
The GPL FAQ is quite clear:
Does the GPL allow me to distribute copies under a nondisclosure agreement?
No. The GPL says that anyone who receives a copy from you has the right to redistribute copies, modified or not. You are not allowed to distribute the work on any more restrictive basis.
Does the GPL allow me to distribute a modified or beta version under a nondisclosure agreement?
No. The GPL says that your modified versions must carry all the freedoms stated in the GPL. Thus, anyone who receives a copy of your version from you has the right to redistribute copies (modified or not) of that version. You may not distribute any version of the work on a more restrictive basis.
The FSF is quite clear here: an NDA that adds restrictions to the GPL terms is a GPL violation.
Finally, consider the special case (which is different from your scenario) that A may regulate how B distributes B's own changes to the GPL-licensed software. A and B may enter into a contract that regulates if and when B distributes B's own changes, since those changes are not licensed under the GPL until distribution of those changes actually occurs. The relevant GPL FAQ item is
Does the GPL allow me to develop a modified version under a nondisclosure agreement?
Yes. For instance, you can accept a contract to develop changes and agree not to release your changes until the client says ok. This is permitted because in this case no GPL-covered code is being distributed under an NDA.
You can also release your changes to the client under the GPL, but agree not to release them to anyone else unless the client says ok. In this case, too, no GPL-covered code is being distributed under an NDA, or under any additional restrictions.
The GPL would give the client the right to redistribute your version. In this scenario, the client will probably choose not to exercise that right, but does have the right.
The last paragraph here indicates that B still has normal GPL rights to distribute A's version, as it was before B made changes to it.
Purely as a matter of legal speculation, consider that an entity may generally enter into a contract promising not to do some particular action. It may be legally possible that B could obtain GPL rights from A, and then later freely enter into a contract with A to promise not to exercise some of those GPL-granted rights, in exchange for some consideration from A.
As a very simple example, suppose entity A hosts a public GPL-licensed repository and derives ad revenue from visitors. Entity A might enter into a contract to pay competitor B some monthly payment in exchange for B not to host a clone of the repo on B's own site. B certainly has the right to host a clone of the repo (absent a contract not to) but they can freely choose to sell away that right.
However, I am not a lawyer, and I don't know how this might be done safely in practice without violating the terms of the GPL. Certainly consult a lawyer if you want to try this: there may be a right and a wrong way to do this. For example, there may be a significant legal difference between B entering into a contract before A transfers the software versus entering into a contract sometime after the software is transferred.
There is sufficient difference between "terms of the license grant from A to B" versus "a contract agreement between A and B separate from the license grant" that both might coexist without a GPL violation, but I certainly cannot advise you how to do this in practice.