By the start of the Genpei War in 1180, Japanese warriors were utilizing the weapons, armor, and general structure of command that would last through the Warring States. The armies would get much larger, the armor heavier, and the tactics much more nuanced, but a Heian-era warrior would be easily recognizable as a "samurai" the way we understand them to be today.
The core of a Japanese army was the sonae, roughly the equivalent of a regiment in European military thinking. Each daimyou (feudal lord) with a domain worth more than 10,000 koku (a measurement of rice production, said to be what one person required as food for a year) was expected to maintain at least one sonae, though in the warring states era the largest domains could field dozens of them.
A sonae could range in size from a small, 300-man detachment of archers and samurai to a 1500+ force. A sonae was lead by a taishou. In small battles, the Daimyou filled this role with his forces assembled into a single sonae. In mass battles, the Daimyou led the battle in command of the honjin, which served as both a headquarters unit and typically the strongest single unit in the battle, while trusted retainers were picked to lead the other sonae.
Within each sonae, the troops were broken down into kumi based on the weapons they wielded and took direct orders from a kogashira. For example, archers formed yumigumi, mounted samurai formed kibatai, logistical troops formed into konida etc...
While every clan had their own preferences, traditions, and resources that determined the makeup of the army, the standard arrangement was to have archers to the front, polearms behind them, dismounted samurai at the center of a formation, and mounted samurai to the flank or rear. Depending on the terrain and manpower in the unit, kumi were usually staged in rows one to three men deep and broadly spaced.
This all makes the Japanese armies sound shockingly standardized and regimented, but the reality on the ground was far different than the formal doctrines. Entire Sonae might be nothing but archers and pikeman with a few dismounted samurai supporting them. It was rare for every sonae in a large army to have its own mounted warriors; some Daimyou preferred to detach archers as skirmishing units or mass a cavalry charge. Especially in the early days of the warring states, it was not uncommon for a battle to break down into a series of smaller duels, like the wars of a generation before.
EDIT: One additional thought, since you were asking about guns. While the basic formations and divisions of a Japanese feudal army didn't change significantly through the formation of the Tokugawa Shogunate (teppogumi with guns were used in place of, and often alongside, bow-wielding yumigumi) the gun totally changed the calculus of warfare.
The major turning point was the Battle of Nagashino in 1575. Oda Nobunaga and Tokugawa Ieyasu were facing the much-feared cavalry of the Takeda clan, which had dealt Tokugawa the worst defeat of his life just two years earlier at Mikatagahara. Oda devises a strategy of volley fire from behind wooden stockades, determined to break the seige of Nagashino Castle.
The gunners opened fire when the Takeda cavalry was 50 yards out; the few who survived the volley of 3000 guns were cut down by Tokugawa swordsman. By the time he was forced to retreat, Takeda had lost around 10,000 of the 15,000 troops he had brought to Nagashino.