Ok. Let's take this one step at a time.
You describe your opponent as a "maniac". However, that player displays no "maniac" behavior in this hand, so I'm not sure where to go with that. I'd like more information on how you get that read on the player. But we can still analyze the hand.
So you wake up with A4os in middle position and decide to raise 6x the blinds (pretty standard in low stakes). However, managing odds and dealing with starting hands in low-stakes is just the same as in higher-stakes. My first question is: Why are you raising in middle position with A rag into a table with a "maniac" (or a really loose aggressive player)? That is suspect to begin with. As a general rule, when the table is loose - tighten up. When the table is tight - loosen up a bit. What you are doing here pre-flop is gambling IMHO.
Ok. Flop comes. You have two pre-flop callers. From the action pre-flop I can only guess that Villain 1 started under the gun and checked the flop. You then basically totally pot-commit yourself with the less than pot-sized bet. What you are doing here is "betting on the fade" - meaning that you bet that you have "faded" the K on the flop with your KK44A hand (two pair with A kicker). Clearly you are betting that your opponents don't have an K - or, perhaps simultaneously, trying to represent a K. So you're trying to bet for value (two pair with A kicker) or you are firing a semi-bluff. From an odds perspective, your chance of "fading" a K is about 90%. Meaning that there is only a 10% chance the other two players have a K (2 Ks at about 2.5% per card for each player = 2.5% x 2 x 2 = 10%).
Those odds might justify a push post flop. However, I wouldn't say you "played the hand" correctly necessarily. It looks like you got frustrated with a bully, raised when you saw an A, got semi-lucky on the flop and you held up against a calling station.
What you need to do against a super loose and aggressive player - a maniac - is to wait for a strong hand (top ten or top 15 hand) in position and then push back. Being in position - on the maniac's left - is key. If you have AA, KK or QQ just push from any position. If you go into the hand with the best of it, even if you went all-in pre-flop every time, you would eventually win. In this case, you were out of position with a weak hand. In short - you got lucky. However, I'd rather be lucky than good.