A lot of confusion is generated by not stating your coordinate system. If you are writing Newton's 2nd law, then irrespective of the coordinate system:
T + W = ma, where the tension, the weight and the acceleration are vectors. Note that there are no negative signs here. I wrote the vectors in bold font.
Now, if you specify the coordinate system, and take the upward direction as positive, then the components of the above equation in the vertical direction give you
T - mg = ma. In this equation, a is an algebraic quantity. If the tension is larger than the weight, then a is positive. If T is smaller than mg, then a is negative.
For the inclined plane without friction, again, first write Newton's second law for the forces
N + W = ma (no negative signs). N is the normal force, and W is the weight
Take the x-axis down the inclined plane, and the y-axis perpendicular to the plane, along the direction of the normal force. Take components, with θ the angle of the incline above horizontal.
N - mg cos(θ) = 0 (y-components)
mg sin(θ) = ma (x-components)
The x-component equation is precisely what you wrote. Note that this does not mean a is negative. It is actually positive. Generally, everything with a minus sign in front of it is not necessarily negative. These are all algebraic quantities, and can stand for positive or negative quantities, with or without a negative sign in front of them.