Two clues:
• Word order: Standard German main clauses are Subject–Verb–(Direct Object). We have Ich (subject) kaufe (verb) buntes Spielzeug (object).
• Adjective ending: The -es on buntes signals neuter singular accusative. That matches a direct object role in this context.
• für das Kind (accusative): “I buy colorful toys for the child.” Here das Kind is the object of the preposition für.
• dem Kind (dative): “I’m buying the child colorful toys.” Here dem Kind is a dative indirect object, and buntes Spielzeug remains the direct (accusative) object. The dative construction is a bit more “direct” about the recipient.
You can pluralize Spielzeug as die Spielzeuge, though it’s less common since Spielzeug is often mass. If you do, you’d say bunte Spielzeuge:
• Article: die (plural nom./acc.)
• Adjective: bunte (weak declension after a definite article)
Example: Ich kaufe heute bunte Spielzeuge für die Kinder.
Absolutely. You only need to keep the finite verb in second position. Both of these are correct:
• Heute kaufe ich buntes Spielzeug für das Kind.
• Ich kaufe heute buntes Spielzeug für das Kind.
The choice just shifts the focus or emphasis.